[Sugar-devel] [FEATURE] Enhanced Gettext

Benjamin M. Schwartz bmschwar at fas.harvard.edu
Tue Jan 5 14:22:28 EST 2010


Sayamindu Dasgupta wrote:
> What I'm looking for is some sort of "fallback" mechanism in gettext,
> which would look for .mo files in the custom location first, and then
> in the usual location (as supplied to, say bindtextdomain())

I'm inclined to provide fallback by having Sugar synthesize a new
directory of symlinked .mo files, as a composite of the available
translation sets according to whatever rules we decide to employ.  The
activity can then be pointed to this directory with a single
bindtextdomain call.

I like this solution because (1) it minimizes the changes needed to
activities, (2) it avoids forking gettext, and (3) it leaves the very
tricky translation precedence logic in Glucose, which is where I think it
belongs.  This is especially important due to the complex interaction with
security/containerization.

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20100105/cc97a2b9/attachment.pgp 


More information about the Sugar-devel mailing list