iGEL / it

A helper for links and other html tags in your translations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mismatched pluralization lookup when localized string missing

JasonBarnabe opened this issue · comments

  • App has multiple locales with a fallback to English.
  • A specific string has pluralization keys (one and other for English).
  • Attempting to render in Serbian locale, which should have one, few, many, and other 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.