Ukrainian pluralization bug

If anyone can help me with pluralization rules in Ukrainian, that would be nice. :wink:

Currently, we have these rules:

I18n.pluralizationRules['uk'] = function (n) {
  if (n == 0) return ["zero", "none", "other"];
  if (n % 10 == 1 && n % 100 != 11) return "one";
  if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20)) return "few";
  return "many";
};

If n is 5, then it will default to many, but translations we get from Transifex never have many in them. e.g.,

    replies:
      one: "1 відповідь"
      few: "%{count} відповідей"
      other: "%{count} відповідей"

Should the rules be returning other instead of many? Or is there a problem with Transifex not returning the translations for many?

5 Likes

According to Unicode it should be one, few, many and other, where, if I read this correctly, other is only used for certain decimal numbers.

So, yeah, this could be a problem with Transifex where they switched many and other. But I don’t speak Ukrainian, so I may be mistaken.

BTW: Don’t forget the pluralization rules used by Ruby and MessageFormat.

3 Likes

Yeah they all include many as an option.

Transifex doesn’t have many as an option for translators. Looks like a Transifex bug.

3 Likes