[SailfishDevel] translations and internationalisations

stol at bredband.net stol at bredband.net
Fri Mar 20 12:18:51 UTC 2015



Hi 

I created a new project, myapp, wich contain the following
"translations" files 

harbour-myapp-de.ts

 About


About

harbour-myapp.ts

 About

 About

About.qml pages looks like this


Page {
......
...... 

 title: qsTr("About")
 } 

When I compile the
project Qt have only "built" the de file, in
../build-harbour-myApp-MerSDK_SailfishOS_i486-Debug/translations/


harbour-lapis-de.qm 
harbour-lapis-de.ts 

Should it not have built
the other one as well, that is harbour-myapp.ts ? 

If I change the file
harbour-myapp.ts (which i assume is the default one) into


harbour-myapp.ts

 About

 About
 HELLO THERE

Nothing happens on the
screen, title: qsTr("About"), still writes "About" and not "HELLO THERE"
as expected. 

According to Qt homepage there are some tools, lupdate
and lrelease mention but they are not installed in the Qt
distribution
and entering those at the command prompt gives error
message.
However lupdate/lrelease seems to be used for backward
engineering text, lupdate extracts from the source code texts 
and
create the .ts files, which is only useful when trying to
internationalise an finished application. 

Is not qsTr using it's
argument to look up in the .ts (.qm) files what text it should use in
runtime? 

/Stefan 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20150320/26134faf/attachment.html>


More information about the Devel mailing list