Poll: Russian pluralization rules: need confirmation from Russian Discrouse users before it can be implementated

(Anton) #1

Dear Russian speaking community!

Currently, Russian translation cannot be finalized because there are some issues that need your attention and approval. If you run a Russian version of Discourse, you should have noticed that the home page has many untranslated strings here and there that spoil the page:


I’m trying to sort out the Russian pluralization rules once and for all, and I’ve proposed a solution to @neil and @techAPJ in private messaging.

While I’ve discussed my proposed solutions with some Russian-speaking developers this side, a confirmation from Discourse community is still needed, so please either support or criticize but do not pass by if you speak Russian.


For translations to be possible, there is a function which returns a translation key based on a number.

For example, for English there are only two keys:
1 => one
2, 3, 4, … => other

Thus, there are only two versions of any string in English - for one and for many things.

For example:
1 => one => 1 cat
20 => other => % cats => 20 cats

For every language, a particular set of keys can be defined in order to allow translators to pluralize strings correctly. So, some languages need only 2 keys, but others, as Russian, need 3 or even more.


So, we have to translate, for example, % message(s) to Russian:

  • 1 сообщение (the suffix is e)
  • 2 сообщения (the suffix is я)
  • 3 сообщения
  • 4 сообщения
  • 5 сообщений (the suffix is ий)
  • … and so on

We can see that there are 3 versions, and they cover all possible numbers.

There are currently 2 problems with pluralization keys for Russian:

Problem 1. There are 4 keys while we need only 3. The keys are: one, few, many, other

Problem 2. The current keys are not intuitive and make no sense.
While it may seem that few is for 2 to 4 (2,3,4 сообщения), it is actually wrong because 15102 will also use the same suffix - 15102 сообщения, but it is nowhere near few.

So, while there are 4 keys in the system instead of 3, and while the keys are named not intuitively, we will continue struggling bad and/or incomplete Russian translation for Discourse.

I want to fix it once and for all and to finalize the Russian translations, but I cannot before you, the community members, say YES for the solution described below, or critisize it - that’s what Discrouse team requires!


The solution is simple - I propose to use 3 keys: one, two and five.

Firstly, it covers all possible keys, which can be seen here: Edit fiddle - JSFiddle

Secondly, I guess it should be very intuitive for any translator to understand which translation to make for which key.

While it is not clear what is difference between few and many (old keys),
it is very clear what is two and five (proposed keys).

So for example for % message(s) we will have 3 keys with the following Russian translations:

one => 1 сообщение
two => % сообщения
five => % сообщений

While for English we have only two keys:

one => 1 message
other => % messages

Please vote!

Now what is important is your opinion.
If you would bee a translator, would you understand what translation to write in a box like this?


Please vote, and if you don’t like the idea, then please propose your own keys!

  • I support one, two, five
  • I support one, two, other
  • I want to keep one, few, many
  • I want to propose a better idea (please explain in a reply to this topic)
  • I do not understand what this all is about
  • I would like to vote, but the explanations above are unclear and confusing!

Thank you for your time and attention.

Let's sort out singular vs plural for Russian (and actually all the other languages)
Russian localization missing key
(Troy Elliott) #2

I support one, two, five

(mrXCray) #3

‘one’, ‘two’, ‘five’ it is!

(Василий Пухов) #4

It is not clear how and where to vote.

I support “one, two, five” keys. Maybe “one, two, several” are ok too.

(Andrey Zaika) #6

I support one, two, five
Thanks for your great work!

(Rikki Tooley) #7

@meglio the first list in the post is assumed to be the poll! Until there is some special syntax added you have to put the poll options before any other list.

(Anton) #8

Thanks you! But it’s now late to create a new topic because we’ve gathered some feedback here already.

(Daniel Gagnon) #9

Are you handling languages that treat zero as singular with the one key or would you need to add a zero key too?

(Anton) #10

Even in the English language file there is no zero key for pluralization, so I suppose zero cases are handled just as separate strings and are translated separately. That’s why I proposed five and not zero - so there is no confusion, otherwise people may translate the zero as no messages instead of {{count}} messages, which is not what we need.

(Daniel Gagnon) #11

The difference is that in English, zero is plural so you basically have the following two cases:

  • One
  • Not one

In other languages like French (and probably other romance languages), zero is singular so you have:

  • Zero or one
  • Not zero or one

If you always special case your zero (like your no messages example) then yes, the issue go away.

(Anton) #12

I see, that’s interesting. The good news is that five and zero in Russian are covered by the same translation rule, so it will just work.

(Luke S) #13

But you can edit your original post. I’d suggest putting your options at the top, then the explanations. You might need to flag one of the devs, such as @sam, to re-bake the post.

(Anton) #14

Thanks @Sailsman63, I just think before the preparation of v1.0, which is coming soon, it’s not the right time to distract them from doing important development.

(Anton) #15

Because it is difficult to get Transifex change pluralization keys they use, I just had to adapt the existing Discourse codebase to the 3 keys which Transifex currently proposes for Russian translators:


Personally, I believe the Transifex design fails in this part: every particular project should be able to override pluralization keys. These keys are currently hardcoded by Transifex and we cannot change them, so asking them to use one, two and five will require every project that uses Transifex to adapt, which seems rather impossible.