google-code-export / globalite

Automatically exported from code.google.com/p/globalite
1 stars 0 forks source link

[PATCH] When translation is missing, get first _defined_ translation from family rather than last translation, defined or not #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Suppose one is viewing a localized site with the locale en-CA. The site
does ":foo.l".

The key "foo" is translated in en-uk.yml but not in en-ca.yml or en-us.yml.

Now, since it's not in en-CA, Globalite will look through all en-* files to
 find a translation. However, it does not stop when it finds a translation.
It will loop through _all_ en-* files and will set the translation from
whichever is the last en-* file consulted.

This means that it might get a correct translation from en-uk.yml, but will
then proceed to check en-us.yml and set the translation to the error_msg.

The attached patch makes Globalite stop when it finds a translation.

Original issue reported on code.google.com by henrik%n...@gtempaccount.com on 9 Nov 2007 at 3:19

Attachments: