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
Curahee
Posts: 215
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings
Accepted Solution

i18n type obsolute

Hello BB devs

 

My application is almost done and ready to be packaged. But I can't get the application to be internationalized.

 

I have 2 different web urls for 2 different languages. So I put them in my Application.ts and Application_fr.ts. The application name succeeded. So the title on my screens is translated.

 

But for the url he always puts type="obsolute" in the xml file. Example:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fr_FR">
<context>
    <name>Application</name>
    <message>
        <source>webUrl</source>
        <translation type="obsolete">http://frurl.fr</translation>
    </message>
</context>
<context>
    <name>main</name>
    <message>
        <source>Application</source>
        <translation>French stuff</translation>
    </message>
</context>
</TS>

 So when I remove the type="obsolute", the moment I click "run" he just put it back there. It's really annoying me...

 

Someone nows the problem here?

 

Thanks

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
ekke
Posts: 1,428
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: i18n type obsolute

have you tried to translate this using QtLinguist ?

-------------------------------------------------------------------------------
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
Curahee
Posts: 215
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: i18n type obsolute

No I did not. I don't know what it is actually. I googled it and it seems like a tool to translate stuff.

 

But why should I use it? I only have a couple of words and this url. But it seems like it doesn't want to work here.

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
ekke
Posts: 1,428
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: i18n type obsolute

in my translations I haven't URL's yet

 

I would download QtLinguist and translate and take a look at the .ts file -

perhaps something different  then

 

-------------------------------------------------------------------------------
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
Curahee
Posts: 215
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: i18n type obsolute

It doesn't help. Can't get it right...

 

I found that "obsolete" means that the string is not used. It looks like he just can't execute the tr() method.

 

Is there something wrong with the next line?

 

QString url(tr("webUrl"));

 It looks like it's not possible...

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
Curahee
Posts: 215
Registered: ‎01-12-2013
My Device: z30
My Carrier: Mobile Vikings

Re: i18n type obsolute

I solved it. 

 

You have to put this in your Application.pro file

 

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

 

______________________________________________________
beRail: BlackBerry World - GitHub
Mobile Vikings: BlackBerry World - GitHub
Park in Brussels: BlackBerry World
Please use plain text.
Developer
ekke
Posts: 1,428
Registered: ‎04-08-2010
My Device: Z10 (red Limited Edition), Q10, Z30
My Carrier: Telekom.de, O2, Vodafone

Re: i18n type obsolute

I have only subfolders of asset in my .pro

$$BASEDIR/../assets/*.qml

should already be in .pri

 

my .pro looks like this:

include(config.pri)

lupdate_inclusion {
    SOURCES += \
    	$$BASEDIR/../src/*.cpp
        $$BASEDIR/../assets/dispatch/*.qml
        $$BASEDIR/../assets/orders/*.qml
        $$BASEDIR/../assets/common/*.qml
}

 

-------------------------------------------------------------------------------
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.