Skip to content

Latest commit

 

History

History
61 lines (37 loc) · 1.51 KB

README.rdoc

File metadata and controls

61 lines (37 loc) · 1.51 KB

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