I18n
Pluralization
By default releaf will only create non-pluralized translation version.
I18n.t("cow", count: 1)
will create empty translation with cow
key.
If you need to auto create all pluralized versions for translation, pass “create_plurals: true” option.
I18n.t("cow", count: 1, create_plurals: true)
will create cow.one, cow.many, cow.zero
and other variations depeding on Releaf.available_locales.
Caveat
Calling I18n.t("cow", count: 1)
and then changing translation call to I18n.t("cow", count: 1, create_plurals: true)
will not result of pluralized translations creation as first call will create empty translation and mark given key (“cow”) as missing. To solve this problem force releaf i18n cache to reload (restart rails, save some translations from admin or call I18n.backend.reload_cache
)