I would love to improve my proposal, but I still miss some info.
In the calculator app I can see the internationalization implemented in Storage.qml file as part of the Storage component. I wanted to have it isolated in a *.js library in rssreader. I was not able to find out how to use i18n object properly in *.js files, that is why I pass 'i18n' object form QML to JS and use it there.
David: do you think it will not work in terms of internationalization/plurals? I am refering to line 463 of the diff below:
return i18n.tr(FORMAT_LIMITS[i].formats[0], FORMAT_LIMITS[i].formats[1], val).arg(val)
Will the translation tool catch up with such a dynamic call to i18n.tr? Please note that I provide all the information necessary for plurals handling there.
If this is not supposed to work in *.js files I can prepare a QML component implementing this behaviour and reuse it in both: the calculator and the rssreader.
I would love to improve my proposal, but I still miss some info.
In the calculator app I can see the internationaliz ation implemented in Storage.qml file as part of the Storage component. I wanted to have it isolated in a *.js library in rssreader. I was not able to find out how to use i18n object properly in *.js files, that is why I pass 'i18n' object form QML to JS and use it there.
David: do you think it will not work in terms of internationaliz ation/plurals? I am refering to line 463 of the diff below: FORMAT_ LIMITS[ i].formats[ 0], FORMAT_ LIMITS[ i].formats[ 1], val).arg(val)
return i18n.tr(
Will the translation tool catch up with such a dynamic call to i18n.tr? Please note that I provide all the information necessary for plurals handling there.
If this is not supposed to work in *.js files I can prepare a QML component implementing this behaviour and reuse it in both: the calculator and the rssreader.
Cheers,
Dariusz