question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support languages with more than 2 plural forms

See original GitHub issue

I’m translating grocy to russian ATM. There are string that can’t be translated into russian cleanly.

Example:

1 Pack
2,3,4... Packs

can’t be translated using only two plural forms as in english, as russian has 3 different plural forms. It should be translated like this:

1,21,31,41,n1 Упаковка
2,3,4,22,23,24,32,33,34,n2,n3,n4 Упаковки
5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,25,26,27,28,29,n5,n6,n7,n8,n9 Упаковок

Otherwise it looks awful:

1 Упаковка
1 Упаков(ки/ок)

Please use ngettext from gettext or other translation frameworks that uses this function.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ASMfreaKcommented, May 2, 2019

Ping me, when there’ll be a version on Transifex, I’ll try to help with russian and other european languages.

0reactions
berrndcommented, May 5, 2019

All strings with more than 1 placeholder now have named placeholders.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pluralization (p11n) - the many of plurals
For example, Chinese and Japanese have a single form for plurals. German, English, Spanish have two forms. On the other hand, some Slavic ......
Read more >
Are there any languages with different plural forms for ...
Arabic: kitaab "book", kitaabayn "[two] books", kutub "[more than two] ... there are languages with dual and trial numbers, as well as forms...
Read more >
Is there a language with multiple plural forms for most words?
Arabic has dual and plural, one form for two items, another for three or more. Goes deep into grammar for the language, beyond...
Read more >
Unicode CLDR - Plural Rules
Languages vary in how they handle plurals of nouns or unit expressions ("hour" vs "hours", and so on). Some languages have two forms,...
Read more >
Plural forms
Many languages have two grammatical forms for singular and plural phrases. ... Arabic has the most with six different plural forms.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found