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

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.

1 Like