it
it copied to clipboard
Mismatched pluralization lookup when localized string missing
- App has multiple locales with a fallback to English.
- A specific string has pluralization keys (
one
andother
for English). - Attempting to render in Serbian locale, which should have
one
,few
,many
, andother
pluralization keys. - Serbian locale is completely missing this translation.
Using the it
helper results in I18n::InvalidPluralizationData
. This line is calling I18n.backend#pluralize
with the English key hash but with the Serbian locale. In this case, because the keys fell back to English, it should be calling it with the English locale.
Using t
does not have the issue - string is rendered in English without error.