[SailfishDevel] SDK 1404 and translations

Luca Donaggio donaggio at gmail.com
Tue Apr 22 13:47:13 UTC 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20140422/235932c4/attachment.html>


More information about the Devel mailing list