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
Posts: 230
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

______________________________________________________
BB10-OAuth: GitHub
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 230
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.

______________________________________________________
BB10-OAuth: GitHub
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 230
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...

______________________________________________________
BB10-OAuth: GitHub
Developer
Posts: 230
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
}

 

______________________________________________________
BB10-OAuth: GitHub
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
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
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner