Skip to content

knugie/translator

 
 

Repository files navigation

Translator Build Status Code Climate Coverage Status Documentation Status MIT licensed Dependency Status

Translator is based on IYE. Translator makes it easy to translate your Rails I18N files and keep them up to date. It uses YAML files directly, so you don't need to keep a separate database in sync. This has several benefits:

  • Branching and diffing is trivial
  • It does not alter the workflow for developers etc., whom can continue editing the YAML files directly
  • If your YAML files are organized in subfolders, this structure is kept intact

Translator

Prerequisites

You need to understand a few things about Translator for it to make sense, mainly:

  • Translator does not create new keys - keys must exist for at least one locale in the YAML files
  • Translator does not create new locales - at least one key must exist for each locale in the YAML files

Workflow

  1. Install Translator:

     $ git clone git@github.com:Sage/translator.git
     $ cd translator
     $ gem build translator.gemspec
     $ gem install translator-1.3.1.gem
    
  2. The translator executable is now available, use it wherever you want.

     $ translator path/to/i18n/locales [port]
    

    At this point Translator loads all translation keys for all locales, and creates any keys that might be missing for existing locales, the default port is 5050

  3. Point browser at http://localhost:5050

  4. Make changes and press 'Save' - each time you do this, all the keys will be written to their original YAML files.

  5. Review your changes before committing files, e.g. by using git diff.

Development

Getting started

    $ git clone git@github.com:Sage/translator.git
    $ cd translator
    $ gem install bundler
    $ bundle install
    $ SIMPLE_COV=true bundle exec guard

About

Translator makes it easy to translate your Rails I18N files and keep them up to date

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 79.7%
  • HTML 20.3%