Russian Language for XBMC

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Martijn Online
Team-XBMC
Posts: 7,697
Joined: Jul 2011
Reputation: 114
Location: Dawn of time
Post: #11
Roman_V_M Wrote:e.g. "4 episodes" or "10 items".
Many software products that are targeted to Russian or other Slavic markets have software checks for stings like "numeral+noun" to choose a correct form.
I do understand that this is too much to ask to introduce such checks in XBMC, but maybe the developers could avoid strings like "number+noun", e.g. "3 episodes", "10 items" and always use the forms like "noun:+numeral" instead, e.g. "Episodes: 3", "Items: 10". In this case we can use only 1 form and no need for numeral checks.
This will greatly simplify the job for Slavic translators and help to avoid weird looking GUI strings with grammar errors ("3 серий", "71 объектов") in their languages.

Just to shim in. I do understand the problems for Slavic languages but the problem is that "Items: 10" just doesn't sound right to me. It's not a natural way of saying things.

When i translate that to my native language Dutch it says "Stuks: 10" and "Afleveringen: 3" and that really sounds horrible.
It just isn't right.
"10 Stuks" and "3 Afleveringen" make definitely much much more sense to us.
So what you propose to "fix" for your language will break other "languages"

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first


For your mediacenter artwork go to
[Image: fanarttv.png]
(This post was last modified: 2012-02-10 14:58 by Martijn.)
find quote
alanwww1 Offline
Team-XBMC Member
Posts: 1,299
Joined: Nov 2008
Reputation: 31
Location: Hungary
Post: #12
We are thinking of the solutions. Stay tuned.

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.
find quote
viljoviitanen Offline
Junior Member
Posts: 46
Joined: Apr 2010
Reputation: 0
Location: Jyväskylä, Finland
Post: #13
http://www.gnu.org/software/libc/manual/...tions.html

Just sayin' Wink
find quote
Martijn Online
Team-XBMC
Posts: 7,697
Joined: Jul 2011
Reputation: 114
Location: Dawn of time
Post: #14
viljoviitanen Wrote:http://www.gnu.org/software/libc/manual/...tions.html

Just sayin' Wink

OK that works for XBMC itself but not for skins.
Maybe it can for add-ons but then they would need the ability to use that libc

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first


For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
viljoviitanen Offline
Junior Member
Posts: 46
Joined: Apr 2010
Reputation: 0
Location: Jyväskylä, Finland
Post: #15
Martijn Wrote:OK that works for XBMC itself but not for skins.
Maybe it can for add-ons but then they would need the ability to use that libc

Please elaborate. Why would it not work with skins? Are you familiar with the xbmc c++ codebase and how the current localization system works internally?

Anyway I'm not saying it's easy to switch the localization system, surely it's a lot of work, and an additional huge effort to convert all current skins and addons to the new system. Hopefully though if the localization system is to be changed, it could done in a backwards compatible way so that all skins and addons do not need to be changed at once.

Now that I'm thinking about it, maybe the backwards compatible way for skins and addons would be so that if a numeric id is requested, use the old system, if a proper string, use the new system. So e.g. in skin it would be a matter of changing

<label>31006</label>

to

<label>View Options</label>

and then just change how the strings are fetched. I'm not sure how easily this could be accomplished. Anyway it seems mostly elsewhere in the code just the Get method is called, and if Get method was expanded so that it takes either an int or a string argument, that would be the start. (But it's been over 15 years since I last did anything with C++. So)

https://github.com/xbmc/xbmc/blob/master...trings.cpp
find quote
Martijn Online
Team-XBMC
Posts: 7,697
Joined: Jul 2011
Reputation: 114
Location: Dawn of time
Post: #16
viljoviitanen Wrote:Please elaborate. Why would it not work with skins? Are you familiar with the xbmc c++ codebase and how the current localization system works internally?

I have no idea how the XBMC code works Smile

for example this custom string in a skin:
PHP Code:
<string id="31025">Items</string

It should say "Item"or "Items". So you would need two string ID's.
PHP Code:
<string id="31025">Item</string>
<
string id="31026">Items</string

Now the hard part how is the skin gonna know with this custom string which one to use (in a very simple and easy way)?
There is the stringcompare that maybe could be used but that doesn't make it simpler.

If you use <label>Number of Items</label> that is passed to XBMC how does it know what custom skin string to return?
Just some thinking out loud here. Maybe the team has some ideas on doing this. In the end they will find a way Smile

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first


For your mediacenter artwork go to
[Image: fanarttv.png]
(This post was last modified: 2012-02-11 12:28 by Martijn.)
find quote
viljoviitanen Offline
Junior Member
Posts: 46
Joined: Apr 2010
Reputation: 0
Location: Jyväskylä, Finland
Post: #17
Martijn Wrote:I have no idea how the XBMC code works Smile

for example this custom string in a skin:
PHP Code:
<string id="31025">Items</string

It should say "Item"or "Items". So you would need two string ID's.
PHP Code:
<string id="31025">Item</string>
<
string id="31026">Items</string

Now the hard part how is the skin gonna know with this custom string which one to use (in a very simple and easy way)?

This is where the translation system and bigger changes comes in. The strings needs to be like "%d Items", and there will need to be a way to supply the parameter (%d here means "a decimal number"). Then translation system looks at the parameter, and in case of English, there are two "translations": "%d Item" if parameter=1 and "%d Items" if parameter=!1 (is anything else but one).

In case of other languages, like Russian, there are more complicated rules and more than 2 plular forms.

Sorry for hijacking the thread, this has little to do with the Russian translation any longer...
find quote
Post Reply