Different ways of localization, need a little help
#1
Hi Devs !

I as a translator am running into different untranlatable strings in xbmc or in addons. So far i found the following categories of possible localizations:

1. In main c++ code: the g_localizeStrings.Get function
2. In addons Python code with a form of __language__(x)
3. In skins xml files in a form of $LOCALIZE[SCRIPTx]
4. In internal addons i found they call a class called dllSetting

I have two questions so far:

1.
I ran into trouble with the default weather addon's wind direction and speed tranlation. There is a ticket (http://trac.xbmc.org/ticket/9802) with a working solution. In the patch the solution now looks like this:

Code:
LocalizeOverviewToken(iTmpStr);
        m_info.currentWind.Format(g_localizeStrings.Get(434).c_str(),
            iTmpStr, iTmpInt, g_langInfo.GetSpeedUnitString().c_str());

With this form in strings.xml

Code:
<string id="434">From %s at %i %s</string> <!--From <wind dir.> at <speed> <unit>-->

Can this be replaced with a solution where the tranlators can exchange the speed unit with the speed number ? I mean currently it expects parameters in %s %i %s order, so there is no way to exchange the parametric parts.

2. With ProjectM addon there is a problem with the quality settings part. There with the spin selection line the localization is not working. In fact it shows the string xml numbers (30001-30004) instead of the actual strings. See ticket http://trac.xbmc.org/ticket/9845

I found out that this addon (unlike others) using a class called DllSetting in xbmc_addon_cpp_dll.h in thw following way:

Code:
DllSetting quality(DllSetting::SPIN, "quality", "30000");
      quality.AddEntry("30001");
      quality.AddEntry("30002");
      quality.AddEntry("30003");
      quality.AddEntry("30004");

Somehow the "quality" strings gets translated with the 30000 string, but the spin setting entries they show up as numbers not the actual strings.


I need a little help, where to look for the problems and solutions.

Thanks,

Cheers, Alan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#2
alanwww1 Wrote:Can this be replaced with a solution where the tranlators can exchange the speed unit with the speed number ? I mean currently it expects parameters in %s %i %s order, so there is no way to exchange the parametric parts.
i dont know which formatter is used here but the normal syntax, i.e %1$s for argument 1, doesnt work. you'll just have to find out which it is and replace it with something else
Reply
#3
anything within "" is a string in c++ - you are telling it to insert the string "3000" so it's doing exactly as told. what you mean is this;
Code:
DllSetting quality(DllSetting::SPIN, "quality", g_localizeStrings.Get(30000));
      quality.AddEntry(g_localizeStrings.Get(30001));
      quality.AddEntry(g_localizeStrings.Get(30002));
      quality.AddEntry(g_localizeStrings.Get(30003));
      quality.AddEntry(g_localizeStrings.Get(30004));

problem is this won't work - you're not in the xbmc app space, you are in the add-on app-space. those are not translatable, it's a known issue, we need to get rid of the entire dllsetting nonsense.
Reply
#4
spiff Wrote:we need to get rid of the entire dllsetting nonsense.

I think i got rid of it and made things translatable. Could you please check:

http://trac.xbmc.org/ticket/9845
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
Different ways of localization, need a little help0