ankane / blazer

Business intelligence made simple

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Idea] Add internationalization

tvdeyen opened this issue · comments

This gem is awesome. Thanks for releasing it.

It would be great if the interface could be internationalized (localized and translated), though.

Since this is a Rails engine the i18n gem and all its features as well as the action view (t) helper are already present.

What we would need to do is:

  1. Replace every user facing English string with a call to I18n.t in controllers/models or simply t in views with a proper key and to avoid conflicts the blazer scope.
    Ie. Instead of "Select a date" in app/views/blazer/_variables.html.erb we would use <%= t(:placeholder, scope: [:blazer, :date_select]) %>
  2. Add the current strings as default locale into config/locales/blazer.en.yml
  3. Add localizations for the timepicker used and configure it with current I18n.locale
  4. (Optional) add a locale select into the admin UI

If this is something you would accept as a contribution I would start working on it and open a WIP PR to further discuss how to implement this.

@ankane are you interested in this feature? I would like to continue working on it, because I think it would be beneficial for lot's of people. WDYT?

Future readers, see #415 (comment)