Latest Posts

Topic: How to add cyrillic support (codepage) to TranslationDictionaryRussian?

Keanu

Topic Opener
Joined: 2012-08-14, 00:16
Posts: 1
Ranking
Just found this site
Location: Moscow, Russia
Posted at: 2012-08-14, 01:26

subj

Second question - can I help to localize this game to Russian? Thanks


Top Quote
Shevonar

Joined: 2011-09-05, 21:28
Posts: 136
Ranking
At home in WL-forums
Posted at: 2012-08-14, 02:21

Sure you can: Just create an account at https://launchpad.net and start translating here: https://translations.launchpad.net/widelands/trunk/+lang/ru.

I also noticed that you created a translation dictionary. Sadly the wiki does not support UTF-8 characters currently. I will see if I can fix this soon, so you can really add some content.

Thanks for your help face-smile.png


Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2013-06-20, 19:40

This is now finally possible! The wiki supports utf8 now, so you can use all russian letters as needed.


Top Quote
teh.f4ll3n
Avatar
Joined: 2014-03-06, 16:59
Posts: 8
Ranking
Pry about Widelands
Location: Mom's Basement
Posted at: 2014-03-07, 00:59

So, do I just jump in and plug away at the lines @ launchpad? Or do I need to confirm with someone?


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-03-07, 08:06

Basically, yes. You might check who else is working on the translations and contact them first to see if they have a strategy in place of working together. There are two special things you could do though:


Busy indexing nil values

Top Quote
teh.f4ll3n
Avatar
Joined: 2014-03-06, 16:59
Posts: 8
Ranking
Pry about Widelands
Location: Mom's Basement
Posted at: 2014-03-08, 10:04

I've checked the translation and found a lot of inconsistencies, most likely because the Russian dictionary was never populated. But that's fixable, the problem I'm running into is a bit different: Quantities in Russian language are done differently than in English. In English everything above 1 is plural, in Russian it all depends on what the last digit of the number is. For example, 1 минута, 2-4 минуты, 5-20 минут, 21 минута, 22-24 минуты, 25-30 минут and so on. As you can see, with the exception of 'teens' every number that ends with a 1 is going to require singular nouns, numbers ending with 2-4 require a different form of singular nouns, and numbers ending with 5 need a form of plural nouns. As far as I can see this is not in the code (and frankly, why would it?). Just a heads-up.

Edited: 2014-03-08, 10:28

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-03-08, 13:18

This problem is already solved, we are using ngettext for that https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html

The rule for Russian is:

Plural-Forms: nplurals=3; 
plural=n%10==1 && n%100!=11 ? 0
: n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1
: 2;

If there is a particular string that I have overlooked, please let me know.

Thanks for fixing the dictionary face-smile.png

Edited: 2014-03-08, 13:19

Busy indexing nil values

Top Quote
teh.f4ll3n
Avatar
Joined: 2014-03-06, 16:59
Posts: 8
Ranking
Pry about Widelands
Location: Mom's Basement
Posted at: 2014-03-08, 13:35
Plural-Forms: nplurals=3;
plural=n%10==1 && n%100!=11 ? 0
: n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1
: 2;


Ok, 3 forms.
For 'n' ending with '1' and not '11' use 'form 0'
For 'n' ending with '2-4' and not between '11 & 20' use 'form 1'
Else use 'form 2'
If I interpreted it correctly, then the code is just fine. Must've been the previous translation shortcoming.

Regarding the dictionary and existing translations: it seems that the previous translation was done without a uniform term vocabulary, because I'm seeing inconsistencies. The translations are not necessarily wrong, but sometimes the same object is called differently in different instances. And I'm checking to see if I can bring it all up to par.
Edited: 2014-03-08, 13:42

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2014-03-08, 14:49

Yes, seems like you've got your plurals right. The improved code got imported only this week, and I might have missed a thing or two. So, please do tell if you are having problems with a string, or if you need more space on screen somewhere.

Translation consistency is always important but can be difficult when there is no coordinated team, which is why it's good that you've taken on doing the translation dictonary face-smile.png


Busy indexing nil values

Top Quote