Skip to content

Internationalization for JS code from locale files guard

Notifications You must be signed in to change notification settings

gcko/guard-i18next

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Internationalization for JS code from locale files guard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 96.5%
  • JavaScript 3.5%