Based on Guard::I18n.
I18next guard allows to automatically rebuild javascript translations from YAML files. The output can be consumed by i18next or equivalent libraries
Please be sure to have Guard installed before continue.
Install the gem:
gem install guard-i18next
Add it to your Gemfile:
gem 'guard-i18next'
Add the guard definition to your Guardfile by running this command:
guard init i18next
Please read Guard usage doc
Please read Guard doc for more info about Guardfile DSL.
guard 'i18next' do watch(%r{config/locales/.+\.yml}) end
Specify output directory:
guard 'i18next', :output => 'path/to/output' do watch(%r{config/locales/.+\.yml}) end
Specify javascript namespace:
guard 'i18next', :namespace => 'I18n' do watch(%r{config/locales/.+\.yml}) end
-
Source: Guard::i18next
-
Based off of Guard::i18n
-
Report issues/Questions/Feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.