Repository is archived
No commit activity in last 3 years
No release in over 3 years
Utils to help manage translation in a rails application. Support simple and active record backend. It allow you to click on a untranslated key in your webpage to display a popover to translate this key. You can also get all the untranslated key in your application(More to come
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.1.0, ~> 3.1.1
>= 0
>= 4.0.0, ~> 4.0
~> 4.0.2
 Project Readme

i18n_admin_utils

Gem Version Build Status Code Climate

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).

capture

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