Make UI translations pluggable as add-on gems
Huginn currently has no translations. UI strings in views and helpers are hard-coded in English, and config/locales/en.yml only holds a handful of keys for Devise and distance_in_words. Contributed locale files such as #3687 (Korean) therefore cannot change what users see yet.
The goal is to let translations be added as gems, in the same way Agents can be added through ADDITIONAL_GEMS, so that each language can be maintained by its own community on its own schedule.
This is a good first contribution: the work can be split into small, self-contained pull requests, each of which is useful on its own.
- Replace hard-coded strings in a view or helper with
t(...)calls and add the English keys toconfig/locales/en.yml. One view per PR is fine. - Load locale files from add-on gems, for example through
config.i18n.load_path. - Let the locale be chosen per instance (an environment variable) and later per user.
- Document how to publish a translation gem.
Agent descriptions and option hints are Markdown written in Ruby; how to translate them is a larger question and can be left for later.
If you want to pick up one of these, leave a comment so we can avoid duplicate work.
Related: #3687.
Source: huginn/huginn