Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
javoid
Posts: 189
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA
Accepted Solution

Concerned about translations

[ Edited ]

It seems cascades and c++ is not very friendly when it comes to localizations.

 

I have a ton of translations done with my ts files, and my workflow is like this:

 

1. Add translations to a ts file.

2. build and enjoy 'obsolete' being placed throughout the file.

3. Manually update the pri file because it always self deletes the lupdate_inclusion

4. Open find/replace and go through each ts file, searching <translation type-"unfinished"> and replacing with <translation>

5. Rebuild

 

Is there anything that can be done to avoid having to do steps 3 & 4 each time?

 

When it comes to finally uploading the app (soon), I'm concerned that the pri file will be changed and my localized languages won't be part of the final package.  Is there anything that can be done to ensure the final upload will contain all the languages?

 

 

Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Concerned about translations

I did it this way:

in my .pro file I added my custom qml-file folders:

include(config.pri)

lupdate_inclusion {
    SOURCES += \
        $$BASEDIR/../assets/dispatch/*.qml
}

 so all my qml files from dispatch subfolder were re-generated.

 

I'm using QtLinguist to translate - all works well

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.
Developer
javoid
Posts: 189
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Concerned about translations

Thank you so much Ekkehard!  You just saved me so much frustration!

 

In case anyone needs the example lupdate content, here's what I use on my Mac:

Note that filename.cpp should be each cpp file in your sources directory to add all the tr() to your ts files.

lupdate_inclusion {
    SOURCES += \
$$BASEDIR/../src/Filename.cpp \
$$BASEDIR/../src/main.cpp \ $$BASEDIR/../assets/*.qml }
Please use plain text.
Developer
javoid
Posts: 189
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: Concerned about translations

I'm using QtLinguist to translate - all works well

 

Is it this version here:

http://qt-apps.org/content/show.php/Qt+Linguist+Download?content=89360

Please use plain text.
Developer
ekke
Posts: 1,460
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: Concerned about translations

great to hear that it works for you :smileyhappy:

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
International Development Mobile Apps BlackBerry 10 Cascades
Cascades - Workshops / Trainings / Bootcamps

Open Source Enthusiast
blog: http://ekkes-corner.org videos: http://www.youtube.com/user/ekkescorner
bb10-development: http://appbus.org Twitter: @ekkescorner
Please use plain text.