Add translations inheritance/fallback mechanism

What is the need / problem ?

I spotted a few missing translations in fr_BE, but they are already translated in fr_FR, and don’t require any other local variation.

Who does it impact ?

Translators

What is the current impact of the problem ?

Need all languages to translate all localized strings, even if a proper translation already exists in another (very) close locale.

What is the benefit of focusing on this ?

Speeding up translation process.

Potential solutions that will solve the problem ?

  1. implement translations inheritance, for instance per GitHub - kipcole9/rails-i18n-translation-inheritance-helper: If I18n.translate() fails in a locale, try a broader one. ie. If it fails in en-UK, try in 'en', or 'en-US', 'en-AU', 'en-CA' or other 'en' locales you have installed. This allows simple inheritance to cater for small but important differences between regions of the same language.
  2. or implement language fallback : https://stackoverflow.com/questions/4223806/how-to-use-rails-i18n-fallback-features and related discussions : Fallbacks · ruby-i18n/i18n Wiki · GitHub , it may be as simple as config.i18n.fallbacks = {:fr_BE => [:fr_FR,:fr], :fr_CA => [:fr_BE,:fr_FR;fr]}… but needs to be tested

Selection of a feature candidate

[value x ease matrix if needed]

T-shirt size of our selected feature candidate

Metrics to measure if need is satisfied after feature is implemented

Feature owners

Epic/project where you can follow implementation


Connected wishlist and discovery discussions*

we would use this in Canada. Right now, since France is very quick on translations, I copy their translation over string by string to do the French Canadian translation. Its easier just to have a francophone here review than translate from scratch. If I understand correctly - this could automate that by default - and then I would just need to have a reviewer. Big time savings.

1 Like

Migrated to Wishlist board: Add translations inheritance/fallback mechanism · Issue #84 · openfoodfoundation/wishlist · GitHub