[SailfishDevel] SDK 1404 and translations

Andrey Kozhevnikov coderusinbox at gmail.com
Tue Apr 22 13:57:39 UTC 2014


you should create translations/harbour-yourproject-it.ts yourself. 
QtCreating not making translations for you, it just generates source 
translation and compiling existing translations.

22.04.2014 19:47, Luca Donaggio ?????:
> Did I hit a bug with the newly added translations support?
>
> This two lines in .pro (I just changed the lang code in standard .pro 
> file created by sialfishapp/qtquick app wizard) file:
>
> CONFIG += sailfishapp_i18n
> TRANSLATIONS += translations/harbour-yourproject-it.ts
>
> produce the following error at buld time:
>
> lrelease error: Cannot open 
> /home/mersdk/share/Projects/SailfishOS/harbour-yourproject/translations/harbour-yourproject-it.ts: 
> No such file or directory
>
>
> Looking at sailfishapp_i18n.prf it seems it generates 
> harbour-yourproject.ts file only, not all the *.ts files specified in 
> your .pro file.
>
>
> lupdate command is invoked as per directive:
>
>
> update_translations.commands += mkdir -p translations && lupdate 
> $${TRANSLATION_SOURCES} -ts $${TS_FILE}
>
>
> where $${TS_FILE} is defined beforehand as follows:
>
>
> TS_FILE = $${_PRO_FILE_PWD_}/translations/$${TARGET}.ts
>
>
> Shouldn't it cycle through every file in $${TRANSLATIONS} instead and 
> run lupdate accordingly?
>
>
> Something like this (beware: I'm in no way a cmake expert!!!):
>
>
> for(ts_file, TRANSLATIONS) {
>
> update_translations.commands += lupdate $${TRANSLATION_SOURCES} -ts 
> $$ts_file
>
> }
>
>
> Did I get something wrong or is it really a bug?
>
>
> -- 
> Luca Donaggio
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140422/11ea8872/attachment.html>


More information about the Devel mailing list