i18n_admin_utils
Utils to help manage translation with a rails app
In devlopment...
Please report bugs and features proposition https://github.com/timcolonel/i18n_admin_utils/issues
#Planned features
Main:
Description | Status |
---|---|
On the page(Rendered on the browser) click on a translation missing to display a popover with a form to set the translation | Functional, Working on customization |
Retreive all the translation used inside your application and check they have been translated. | Functional |
Check all the text you have entered in your application withour using t() | TODO |
Other:
- Move the scan functionality to a rake task
rake i18n_admin_utils:scan
that copy all translation key found to the database. The translation page will then only display keys with values as nil - Add posiblility to sync yml with database, development and production translations
- Make account control(Each user can show the list on language he is charged of tranlating)
#Installation Get the gem in your gemfile
gem `i18n_admin_utils`
Initialize
rails g i18n_admin_utils:install
Include javascript in application.html.erb
<%= javascript_include_tag 'i18n_admin_utils/translation_helper' if Rails.env.development? %>
#Configuration The config is in 'config/initializer/i18n_admin_utils.rb'
#How to use
Live editing
Click on a missing translation on the page to display a popover to translate the key.
To spot those translation you can add the class .translation_missing
to your css, e.g.
.translation_missing {
color: red
}
List of all keys used in app
Search the entire project for the use of the t('') method. Then check for all given local for missing translations. You can see where this key is being used(And also live editing the file(Rails embed editor if you need to change the key).
Go to /translation
(Loading might be long if your app is large). You should have a list of key to translate(Don't foregt to setup the locales your application use in the config file). The plugin reload the translation after updating one(You can disable it in the config). So reloading this page should update the translation
I will add some filter for getting the translation in a specific language and search by key.
List the content not using the translation method
Search views for usage of text without using the translation method. This allow you to check your app fully support internationalisation.
TODO