<div dir="ltr">Did I hit a bug with the newly added translations support?<br clear="all"><div><br></div><div>This two lines in .pro (I just changed the lang code in standard .pro file created by sialfishapp/qtquick app wizard) file:<br>
<br>CONFIG += sailfishapp_i18n<br>TRANSLATIONS += translations/harbour-yourproject-it.ts<br><br></div><div>produce the following error at buld time:<br><br>

<p style="margin:0px;text-indent:0px"><span style="color:rgb(190,20,20)">lrelease error: Cannot open /home/mersdk/share/Projects/SailfishOS/harbour-yourproject/translations/harbour-yourproject-it.ts: No such file or directory</span></p>

<p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px;color:rgb(60,60,60)"><span style="color:rgb(0,0,0)">Looking at sailfishapp_i18n.prf it seems it generates harbour-yourproject.ts file only, not all the *.ts files specified in your .pro file</span>.</p>
<p style="margin:0px;text-indent:0px;color:rgb(60,60,60)"><br></p><p style="margin:0px;text-indent:0px">lupdate command is invoked as per directive:</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">
update_translations.commands += mkdir -p translations && lupdate $${TRANSLATION_SOURCES} -ts $${TS_FILE}<br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">where $${TS_FILE} is defined beforehand as follows:</p>
<p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">TS_FILE = $${_PRO_FILE_PWD_}/translations/$${TARGET}.ts</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">
Shouldn't it cycle through every file in $${TRANSLATIONS} instead and run lupdate accordingly?</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">Something like this (beware: I'm in no way a cmake expert!!!):</p>
<p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">for(ts_file, TRANSLATIONS) {</p><p style="margin:0px;text-indent:0px">    update_translations.commands += lupdate $${TRANSLATION_SOURCES} -ts $$ts_file<br>
</p><p style="margin:0px;text-indent:0px">}<br></p><p style="margin:0px;text-indent:0px;color:rgb(60,60,60)"><br></p><p style="margin:0px;text-indent:0px;color:rgb(60,60,60)"><span style="color:rgb(0,0,0)">Did I get something wrong or is it really a bug?</span></p>
<p style="margin:0px;text-indent:0px;color:rgb(60,60,60)"><br></p></div><div>-- <br>Luca Donaggio
</div></div>