Re: [SailfishDevel] SDK 1404 and translations
Thanks a lot Juha, I'll give the latest .prf a try! On Tue, Apr 22, 2014 at 4:10 PM, Juha Kallioinen wrote: > On 22.04.2014 16:47, Luca Donaggio wrote: > > 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. > > > > Did I get something wrong or is it really a bug? > > > You did nothing wrong. It is a bug. > > The translation support was very lightly tested and could fail in a number > of ways. > > This support was changed and fixed over the Easter weekend. If you want to > try the changes and know what to do, you can replace the > sailfishapp_18n.prf file in the sb2 targets with the latest from here: > > > https://github.com/sailfish-sdk/libsailfishapp/blob/master/data/sailfishapp_i18n.prf > > Or as a workaround you can copy the existing .ts file to > harbour-yourproject-it.ts in the project's translations folder. > > The changes will be released after the next device software release. > > Best regards, > Juha > > > > ___ > SailfishOS.org Devel mailing list > -- Luca Donaggio ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] SDK 1404 and translations
On 22.04.2014 16:47, Luca Donaggio wrote: 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. Did I get something wrong or is it really a bug? You did nothing wrong. It is a bug. The translation support was very lightly tested and could fail in a number of ways. This support was changed and fixed over the Easter weekend. If you want to try the changes and know what to do, you can replace the sailfishapp_18n.prf file in the sb2 targets with the latest from here: https://github.com/sailfish-sdk/libsailfishapp/blob/master/data/sailfishapp_i18n.prf Or as a workaround you can copy the existing .ts file to harbour-yourproject-it.ts in the project's translations folder. The changes will be released after the next device software release. Best regards, Juha ___ SailfishOS.org Devel mailing list
Re: [SailfishDevel] SDK 1404 and translations
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 ___ SailfishOS.org Devel mailing list