Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Internationalization for JS code from locale files guard
Ruby JavaScript
Branch: master
Pull request Compare This branch is 9 commits ahead of nicoolas25:master.

Merge pull request #1 from kmees/patch-1

Fixed typo in guard init command
latest commit 045aac206b
@gcko authored

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.