I18n_lint.rb pluralization keys can't be `zero`

AI-generated summary

The i18n_lint.rb pluralization keys do not allow the value zero. pfaffman inquired about this limitation and discovered that the key works in their code due to a special case in the i18n code. However, gerhard explained that using the zero key is not recommended as it is not supported by translation platforms like Transifex or Crowdin, which only recognize the “one” and “other” keys for English. This limitation is due to Unicode definitions for pluralization keys.

Why can’t I have a zero serialization in client.en.yml?

Is there a reason not to use PLURALIZATION_KEYS rather than ENGLISH_KEYS here?

The zero appears to work fine in my code (which is broken for at least one other reason not caught by my tests).

It works because the i18n code has a special case for the zero key. You can continue using it as long as you don’t intend to use a translation platform like Transifex or Crowdin. Unless something changed, they support only keys defined by Unicode which are “one” and “other” for English. So, translating the “zero” key won’t work because those platforms ignore it when they parse English locale files.

Darn. I’m afraid that makes sense. :sob:

Thanks for the explanation.