We have moved to a new Sailfish OS Forum. Please start new discussions there.

[Implemented in 1406 update] Add QtLinguist support to SailfishOS SDK [released]

asked 2014-01-02 13:07:44 +0200

foss4ever gravatar image

updated 2014-06-13 15:24:20 +0200

donaggio gravatar image

The SailfishOS SDK does not currently properly support code translations / localization. QtLinguist requires (among others) commands 'lupdate' and 'lrelease'' the paths of which can be.configured in.QtCreator's external tools section, but these binaries are missing. This means that .ts and .qm files needed for translation support cannot be generated automatically from the code.

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by donaggio
close date 2014-06-13 15:24:29.620092


You should be able to use your system qt provided commands as a workaround.

onion ( 2014-01-02 13:33:16 +0200 )edit

This means I have to install another SDK / toolset, which is ok as a workaround. This, however, does not yet mean full QtLinguist toolset support..

foss4ever ( 2014-01-02 13:48:51 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-01-02 16:47:58 +0200

kaltsi gravatar image

These tools (lrelease/lupdate) are present in the default SDK build targets and you can define translation actions in your *.pro file. There's no need to install anything extra to get automatic translations generated from code.

For now these tools will not be available from QtCreator, because the build/translation process takes place inside the SDK virtual machine and QtCreator cannot issue direct commands there.

edit flag offensive delete publish link more



Ok thanks, didn't know that.. I had only been trying to set them up on external tools tab in QtCreator, but now it's clear why the tools could not be found. Are there any .pro file examples where I could see how the translstion and generation of .ts and,.qm files is done during build?

foss4ever ( 2014-01-02 19:46:00 +0200 )edit

I hope someone can provide an example. I'm not an expert in translation issues.

We might eventually support linguist tools from Qt Creator afterall, but it's hard to say when.

kaltsi ( 2014-01-03 16:36:12 +0200 )edit

Ok, I'd like to keep the question open till we get an answer that how the .ts and .qm files can be now genetated from .pro file, while waiting for a roadmap for QtCreator-based solution. Thanks for your tips.. ;)

foss4ever ( 2014-01-03 16:43:50 +0200 )edit

It has been three weeks and still no answer. This question has been asked on the developers mailing list, but no proper solution / example exists till now. The way people are doing it now seems to involve using lupdate / lrelease binaries from other sdk installs, but still, if it is already implemented behind the scene, it would be nice to have some instructions on how to correctly set up the .pro file.

donaggio ( 2014-01-24 16:19:29 +0200 )edit

@donaggio Same here, still waiting.. I also checked the relevant parts in SailfishOS dev mailing list, and couldn't find an example of howto do it with SailfishOS SDK and/or properly setting up .pro file..

foss4ever ( 2014-01-24 16:37:53 +0200 )edit

Question tools



Asked: 2014-01-02 13:07:44 +0200

Seen: 1,026 times

Last updated: Jun 13 '14