[Sugar-devel] webL10n.js problems

Lionel Laské lionel at olpc-france.org
Sat Apr 9 10:32:41 EDT 2016


Hmmm. Interesting.
Must confess that I'm using key values in my current JS development.

But of course it ask questions for compatibility with Pootle/Python way of
doing.

         Lionel.


2016-04-07 1:21 GMT+02:00 <sugar-devel-request at lists.sugarlabs.org>:

>
> Date: Thu, 7 Apr 2016 09:21:15 +1000
> From: James Cameron <quozl at laptop.org>
> To: Walter Bender <walter.bender at gmail.com>
> Cc: Chris Leonard <cjlhomeaddress at gmail.com>, Sugar-dev Devel
>         <sugar-devel at lists.sugarlabs.org>
> Subject: Re: [Sugar-devel] webL10n.js problems
> Message-ID: <20160406232115.GE28117 at us.netrek.org>
> Content-Type: text/plain; charset=us-ascii
>
> 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/
>
>
> *******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160409/bdc168d6/attachment.html>


More information about the Sugar-devel mailing list