Thanks for this tips.
I wasn't aware this way to access CLDR data.
Thanks a lot


2013/5/8 thron7 <[email protected]>

>
> On 05/07/2013 05:33 PM, Benjamin Dreux wrote:
> > Hi,
> >
> > I would like to propose a change in the way translation is made in
> qooxdo.
> >
> > Just to explain why I propose this change, here is my context.
> >
> > I'm making a list of checkbox, one for each month.
> > I don't want to use much space for this, so i decided to put labels on
> > top of the checkbox.
> > Then i tried to use just one letter for each Month.
> > It looks nice to me.
> >
> > But when looking into the .po files, I noticed that there is only one
> > entry for each letter.
> > So i add comments with each translated string, something like 'short
> > for january'.
> >
> > Run the compiler. But then again there is still one entry by letter.
> >
> > So my proposition is for this kind of situation, create one entry for
> > couple of string and comments matching.
> >
> > This way i could have a 'S' saying septembre, which will be translated
> > in french with 'S' for 'Septembre'.
> > And another 'S' saying sunday which will be translated with 'D' for
> > 'Dimanche'
>
>
> I think this would be the wrong approach. For one thing message IDs are
> unique keys in .po files, and Gettext (which defines .po files) is a
> quasi-standard which is implemented in many tools and libraries, so I
> would not want to break it easily.
>
> For another thing you shouldn't hand-translate I18N data like the names
> of week days or months anyway. These translations are provided with the
> CLDR data that comes with qooxdoo, and your use case is exactly what
> this is for.
>
> So why don't  you just use the CLDR data, getting the localized name
> you're interested in?! You can make the check boxes listen to the
> changeLocale event so you can update the labels correspondingly. I think
> in your case qx.locale.Date.getMonthName() is exactly what you are
> looking for, and the "narrow" format will even return a one letter
> representation.
>
> T.
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their applications. This 200-page book is written by three acclaimed
> leaders in the field. The early access version is available now.
> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>



-- 
Benjamin Dreux
Analyste-Programmeur
Chaire de logiciel libre-Finance Social et solidaire
UQAM
Montréal
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to