Gataro / gettext-js

Automatically exported from code.google.com/p/gettext-js
0 stars 0 forks source link

Some strings are not translated #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using the following .po file and some strings are correctly translated and 
some are not.
For example "Invalid Date!" is correctly displayed as "Date invalide !" but 
"Are you sure you want to delete this entry?" is still displayed in English.
Seems to be a problem with indexOf not finding the strings.

Original issue reported on code.google.com by tae...@gmail.com on 13 Feb 2011 at 1:57

Attachments:

GoogleCodeExporter commented 8 years ago
Hum, I just found it does not depend on the string, but on where it is used in 
the code.
I'll try to find which JS function in doesn't work with.

Original comment by tae...@gmail.com on 13 Feb 2011 at 2:06

GoogleCodeExporter commented 8 years ago
It was a problem of asynchronous loading, I was adding the strings before the 
.po file was parsed.
Here is a patch that adds a custom event GettextLoad, so you just have to do 
document.addEventListener("GettextLoad", init, false); to execute the code 
after Gettext has finished parsing the file.

Original comment by tae...@gmail.com on 13 Feb 2011 at 3:19

Attachments: