Skip to content
Internationalization for JS code from locale files guard
Ruby JavaScript
Pull request Compare This branch is 1 commit ahead, 1 commit behind gcko:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib/guard
spec
test
.gitignore
Gemfile
Guardfile
README.rdoc
Rakefile
guard-i18next.gemspec

README.rdoc

Guard::I18next

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

Install

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

Usage

Please read Guard usage doc

Guardfile

Please read Guard doc for more info about Guardfile DSL.

guard 'i18next' do
  watch(%r{config/locales/.+\.yml})
end

Options

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

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Authors

Jared Scott Nicolas Zermati

Something went wrong with that request. Please try again.