[Sugar-devel] internationalization: homonym handling in genpot?

Gary Martin garycmartin at googlemail.com
Sat Sep 11 09:02:13 EDT 2010


Hi Erik,

On 11 Sep 2010, at 03:31, Erik Blankinship wrote:

> 
> > Just to make sure I understand your solution, if the activity is run in an untranslated language, won't "Arrow|Bow" be displayed?
> 
> Yes. However I was thinking that you could go create/edit the po/en.po file and add in those string corrections,
> 
> This assumes that English will be the default fall back language in a translation is not available?  Is this always the case?

That's a good point, yea it would fallback to the mangled string version if none of po domain files matched. I guess you will need to implement your own little version of _() that:

 - accepts two parameters, a context and string
 - joins them and sends the mangled string through the usual gettext call
 - test to see if gettext has returned the same mangled string, if so return only the string you were given

Regards,
--Gary



More information about the Sugar-devel mailing list