Translation bugs ?

A place for users and developers of the Xataface to discuss and receive support.

Translation bugs ?

Postby GrosBedo » Thu Aug 14, 2008 2:03 pm

Hello again,
sorry to bother you once again, but I can't seem to find a solution in all the website (maybe the search is a little buggy ?).

I'm making a french website, and luckily it seems Xataface is internationalized, and automatically chooses the right language (BTW the french language is very badly translated, I will send you a better version).
But I have two problems:

1- Not all parts are translated, for example the "View Field Content In A New Window" in Details can't ever be translated, I even tried modify template files, en.ini and fr.ini, and it still shows this sentence. "Export XML" and "Details" header aren't translated neither. In fact, it seems that everything in Details isn't translated.

2- There's no problem with accents that I write in fields, they are nicely rendered in Details and List, but accents in "details-controller" div aren't rendered properly, here's what it shows:

1 trouvées ou entrées totales dans la table compta_docs
Affiche 1 des 1 trouvées


I'm sure the solution must be pretty simple, but I can't resolve them. I tried to put in conf.ini:
Code: Select all
oe=UTF-8
ie=UTF-8
default_oe=UTF-8
default_ie=UTF-8


But it doesn't do anything for details-controller...

//EDIT:
I tried the solution found here:
http://xataface.com/forum/viewtopic.php?t=3726#21325
But it didn't work. And I looked inside the sourcecode of the webpage shown, everything seems ok, so I really don't know where the problem could come from if it's not from the character encoding...
GrosBedo
 
Posts: 16
Joined: Wed Aug 13, 2008 10:44 am

Postby Jean » Mon Aug 18, 2008 2:50 am

Hello GrosBedo,
You need to have your file fr.ini coded in UTF-8, I recommend the app pspad to convert it.
About what remains to translate, we, translators, wait for Steve to have time to get all strings into the file en.ini.
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Postby shannah » Mon Aug 18, 2008 9:22 am

Yes.. I haven't been very good about adding strings to en.ini for new additions (like the details page), but I'll try to get better..
-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby GrosBedo » Sun Aug 24, 2008 7:38 am

Jean wrote:Hello GrosBedo,
You need to have your file fr.ini coded in UTF-8, I recommend the app pspad to convert it.
About what remains to translate, we, translators, wait for Steve to have time to get all strings into the file en.ini.
Jean


I think you're misleading. I'm using the default fr.ini provided with Xataface, and I verified that the strings were effectively translated. They are in the file, but not on the screen.

Here's a screenshot of what I see:

Image

In fact, everything that is in the middle of the screen isn't translated (main column). The bug appears in any action like list, record detail or search.

Plus there is a problem with accents, they can't be shown properly, no matter what I do.

I'm on Windows, I use the last Xampp, maybe this is why I get this problem ?
GrosBedo
 
Posts: 16
Joined: Wed Aug 13, 2008 10:44 am

Postby Jean » Mon Aug 25, 2008 12:40 am

Hello,
The accents problem is only a codage problem of the file fr.ini. Your file is not coded in UTF8 or may be what you see is the cache file. Go into your_rep/Dataface/templates_c and delete all the files.
About the string not translated, I don't know, That's right, it is translated in the file fr.ini...
Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Accents problem fixed, but not the others...

Postby GrosBedo » Fri Sep 12, 2008 4:03 pm

Thank you very much Jean for your input, it worked like a charm. I used PSPad to convert the format from ANSI to ISO 8859-2 (UTF-8 didn't work), and now the accents are showing without a bug. Thank's so much !

But still for the translation problem, it's not because of the cache. I'm using Xataface v1.0beta3 so maybe it is a temporary issue.

I found that this bug was simply due to some hardcoded strings inside some core php files. To solve my problem I hardcoded in return the strings I needed, but if someone could explain me how to use the languages files to get a proper code I would be glad to hear :-D

Here's some examples of hardcoded untranslated strings:

Code: Select all
In xataface/Dataface/SkinTool.php you can find the "You are here:" string.

In xataface/Dataface/Record.php you can find the "View field content" string.

In xataface/Dataface/templates/Dataface_Record_Template.html you can find the "Current Record:" string.

In xataface/Dataface/RecordView.php theres $label = "Details"; which should be translated to $label = "Détails"; (I know, just the missing accents but it's an important detail for a professional work).

In xataface/Dataface/actions.ini theres two untranslated strings (maybe more) like label = Export XML
GrosBedo
 
Posts: 16
Joined: Wed Aug 13, 2008 10:44 am

Postby shannah » Mon Sep 15, 2008 7:12 am

A good place to start is at
http://xataface.com/documentation/tutor ... ic-content

In essence, you need to wrap any strings that you find in php files in a df_translate() call, then add the string to the lang/*.ini files.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 30 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved