[Sugar-devel] webL10n.js problems

James Cameron quozl at laptop.org
Wed Apr 6 19:21:15 EDT 2016


Perhaps this is intentional, see line 1136 of l10n.js, where the key is
split by '.' as a delimiter;

https://github.com/fabi1cazenave/webL10n/blob/master/l10n.js#L1136

pointed to by

https://www.npmjs.com/package/webl10n

The usage model seems to be to use key values that aren't the
untranslated message.

On Wed, Apr 06, 2016 at 06:45:39PM -0400, Walter Bender wrote:
> Maybe I have stale bits or maybe I am doing something wrong, but I have been
> wrestling with webL10n.js, which I believe is the recommend module to use for
> localization in JavaScript programs for Sugar. Typical of what I am
> experiencing is that any string with multiple punctuation characters will not
> match the corresponding string in the localization.ini file. I've not yet dug
> into the code, but has anyone else experienced something similar? Or should I
> be using a different tool?
> 
> For example:
> 
> _('Mr Mouse is our Music Blocks conductor. Mr Mouse encourages you to explore
> Music Blocks. Let us start our tour!')
> will not match.
> 
> _('Mr Mouse is our Music Blocks conductor Mr Mouse encourages you to explore
> Music Blocks Let us start our tour!')
> will match.
> 
> regards.
> 
> -walter
> 
> --
> Walter Bender
> Sugar Labs
> [1]http://www.sugarlabs.org
> [2]
> 
> References:
> 
> [1] http://www.sugarlabs.org/
> [2] http://www.sugarlabs.org/

> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list