I am using Transifex on devise-i18n for localization. This lets translators do their work with a web UI and I (the dev) can pull from Transifex.
In this project, I include translations for some locales where pluralization rules are not specified by svenfuchs/rails-i18n: Igbo (ig) and Yoruba (yo). For these languages, Transifex uses the other-only plural form, which is correct according the Plural Language Rules.
What I expected to happen
I expected to be able to use these translations with the correct plural forms as provided by Transifex.
What actually happened
I18n::InvalidPluralizationData: translation data {:other=>"%{count}àsìse sèdíwọ elè yìí %{resource} láti lè fi pamọ́"} can not be used with :count => 1. key 'one' is missing.
Considering it's smart enough to check for the presence of a zero key before using it, why not do the same for one? That way, for locales without pluralization data, having other is sufficient to avoid an error.
As a workaround, I can manually duplicate the others into ones for both of these locales, but that's a hassle.
Versions of i18n, rails, and anything else you think is necessary
What I tried to do
I am using Transifex on devise-i18n for localization. This lets translators do their work with a web UI and I (the dev) can pull from Transifex.
In this project, I include translations for some locales where pluralization rules are not specified by svenfuchs/rails-i18n: Igbo (ig) and Yoruba (yo). For these languages, Transifex uses the
other
-only plural form, which is correct according the Plural Language Rules.What I expected to happen
I expected to be able to use these translations with the correct plural forms as provided by Transifex.
What actually happened
Digging through the code, I found the logic here: https://github.com/ruby-i18n/i18n/blob/3b65f6548245411bc9802f5a547954d370b57821/lib/i18n/backend/base.rb#L308-L311
Considering it's smart enough to check for the presence of a
zero
key before using it, why not do the same forone
? That way, for locales without pluralization data, havingother
is sufficient to avoid an error.As a workaround, I can manually duplicate the
other
s intoone
s for both of these locales, but that's a hassle.Versions of i18n, rails, and anything else you think is necessary