Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Not correct plural forms in "GPS Taces" page on National Languages #2412

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 10 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: Calibrator
[Submitted to the original trac issue database at 3.11pm, Sunday, 1st November 2009]

English Page GPS Traces looks correct: 1 minute ago, 2 minutes ago, 6 minutes ago.
Russian Page not correct: 1 , 2 , 6 .
In Russian must be 2 plural forms: 1 , 2 , 6 .
Not impossible to edit Localised strings in 2 Russian Plural forms. I am not found this strings in http://translatewiki.net/wiki/Translating:OpenStreetMap now.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 9.33am, Monday, 2nd November 2009]

That string is a standard rails message so has to be handled by changing the translation in the rails-i18n plugin. You can find that here:

http://github.com/svenfuchs/rails-i18n

and the Russian translation specifically is here:

http://github.com/svenfuchs/rails-i18n/commits/master/rails/locale/ru.yml

We update from those translations periodically, so if you submit changes there then they will then make their way to OpenStreetMap, and you'll be helping out other rails based sites as well.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 10.29am, Monday, 2nd November 2009]

Actually, looking at the translations for Russian I think the data is already there, we just need a custom pluralizer for Russian. The keys for that message are:

  less_than_x_minutes:
    one:   " {{count}} "
    few:   " {{count}} "
    many:  " {{count}} "
    other: " {{count}} "

We will only be using "one" and "other" though. If you can let me know the rule that should be used decide which numbers map to each of those keys then I can add a custom pluralizer and make it work properly.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 10.30am, Monday, 2nd November 2009]

That quote should have been formatted as:

      less_than_x_minutes:
        one:   " {{count}} "
        few:   " {{count}} "
        many:  " {{count}} "
        other: " {{count}} "

@openstreetmap-trac
Copy link
Author

Author: Calibrator
[Added to the original trac issue at 12.57pm, Monday, 2nd November 2009]

This code may still be useful for you and Ruby I18n community. You can learn how to create custom backends for I18n and how to provide support of standalone (as defined in Unicode CLDR) month names with I18n and Rails, and also how to add dead simple pluralization rules into your translation tables. This library also includes a module (Russian) with a set of helpers to provide simplistic pluralization and strftime for Russian language in a way that is easier than using I18n methods.
Feel free to shoot an email to Yaroslav Markin (yaroslav[at]markin.net)

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 1.10pm, Monday, 2nd November 2009]

What are you referring to exactly? I'd rather not have to add whole code modules for each language if I can avoid it, but if you could just answer my question then I can fix the pluralisation issue...

@openstreetmap-trac
Copy link
Author

Author: Calibrator
[Added to the original trac issue at 2.18pm, Monday, 2nd November 2009]

For Russian:
1,11, 21, 31, ... 91,101, 201... etc:
{{count}}
{{count}}
{{count}}
{{count}}
{{count}}

2-10, 12-20, 22-30,... 92-100 etc:
{{count}}
{{count}}
{{count}}
{{count}}
{{count}}

@openstreetmap-trac
Copy link
Author

Author: Calibrator
[Added to the original trac issue at 2.25pm, Monday, 2nd November 2009]

For Russian: 1,11, 21, 31, ... 91,101, 201... etc:
{{count}} ( <1 min )

{{count}}

{{count}}

{{count}}

{{count}}

2-10, 12-20, 22-30,... 92-100 etc:

{{count}}

{{count}}

{{count}}

{{count}}

{{count}}

@openstreetmap-trac
Copy link
Author

Author: Calibrator
[Added to the original trac issue at 2.28pm, Monday, 2nd November 2009]

sorry. Do Not look my previous messages. Tomorrow I will send more correct. Excuse me.

@openstreetmap-trac
Copy link
Author

Author: Calibrator
[Added to the original trac issue at 9.13pm, Monday, 2nd November 2009]

This is CORRECT version for Russian (uffffff!) :)

1, 21, 31, ... 91, 101, 111, etc.[[BR]]
{{count}} - {{count}} minute(s) ago[[BR]]
{{count}} - about {{count}}hour(s) ago[[BR]]
{{count}} - {{count}} day(s) ago[[BR]]
{{count}} - {{count}} month(s) ago[[BR]]
{{count}} - about {{count}} year(s) ago

2-4, 22-24, 32-34, ... etc.[[BR]]
{{count}} - {{count}} minutes ago[[BR]]
{{count}} - about {{count}}hours ago[[BR]]
{{count}} - {{count}} days ago[[BR]]
{{count}} - {{count}} months ago[[BR]]
{{count}} - more {{count}} years ago

5-20, 25-30, 35-40, ... etc.[[BR]]
{{count}} - {{count}} minutes ago[[BR]]
{{count}} - about {{count}}hours ago[[BR]]
{{count}} - {{count}} days ago[[BR]]
{{count}} - {{count}} months ago[[BR]]
{{count}} - more {{count}} years ago

@openstreetmap-trac
Copy link
Author

Author: tomhughes
[Added to the original trac issue at 9.22am, Tuesday, 3rd November 2009]

(In [18436]) Add russian pluralization logic, based on description in the russion
plugin here:

http://github.com/yaroslav/russian/blob/master/lib/russian/backend/advanced.rb

Also simplify the other pluralizers by defaulting to :other when a
specific subkey is not found.

Closes #2412.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant