Al 21/07/13 21:17, En/na Dariusz Gadomski ha escrit:
> Hi,
>
> Thanks for you opinion. Could you please explain (or provide a link to any docs) how to improve it? I have only experience with pure (no gettext) Qt/QML apps for MeeGo utilizing qsTr in both: *.qml and *.js files. I did not have any clue how to implement i18n in *.js, that's why I pass i18n object there from QML.
>
> In case of MeeGo using an array of strings along with qsTr (like the in line 463 in the diff below) worked fine for all languages (all the culture-specific stuff was done by translators: e.g. inserting Right-To-Left characters etc.).
>
> Do you know any examples of i18n usage in *.js files?
>
> Thanks,
> Dariusz
>
Hi Dariusz,
Yeah, you can use the regular i18n.tr() functions [1] from the Ubuntu
SDK, either in QML or JS files.
You can have a look at clock, weather and other core apps for the usage
of the i18n.tr() function. Also clock and calendar have good examples of
locale-aware times and numbers.
Al 21/07/13 21:17, En/na Dariusz Gadomski ha escrit:
> Hi,
>
> Thanks for you opinion. Could you please explain (or provide a link to any docs) how to improve it? I have only experience with pure (no gettext) Qt/QML apps for MeeGo utilizing qsTr in both: *.qml and *.js files. I did not have any clue how to implement i18n in *.js, that's why I pass i18n object there from QML.
>
> In case of MeeGo using an array of strings along with qsTr (like the in line 463 in the diff below) worked fine for all languages (all the culture-specific stuff was done by translators: e.g. inserting Right-To-Left characters etc.).
>
> Do you know any examples of i18n usage in *.js files?
>
> Thanks,
> Dariusz
>
Hi Dariusz,
Yeah, you can use the regular i18n.tr() functions [1] from the Ubuntu
SDK, either in QML or JS files.
You can have a look at clock, weather and other core apps for the usage
of the i18n.tr() function. Also clock and calendar have good examples of
locale-aware times and numbers.
Cheers,
David.
[1] developer. ubuntu. com/api/ devel/ubuntu- 13.10/qml/ ui-toolkit/ qml-ubuntu- components0- i18n.html
http://