Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.
/ i18n_yaml_editor Public archive

I18n Yaml Editor makes it easy to translate your Rails I18N files and keep them up to date

License

Notifications You must be signed in to change notification settings

Sage/i18n_yaml_editor

Repository files navigation

I18n Yaml Editor

Build Status Maintainability Test Coverage Documentation Status MIT licensed Gem Version

I18n Yaml Editor is based on IYE. I18n Yaml Editor 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

I18n Yaml Editor

Prerequisites

You need to understand a few things about I18n Yaml Editor for it to make sense, mainly:

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

Workflow

  1. Install I18n Yaml Editor:

     $ gem install i18n_yaml_editor
    
  2. The i18n_yaml_editor executable is now available, use it wherever you want.

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

    At this point I18n Yaml Editor 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/i18n_yaml_editor.git
    $ cd i18n_yaml_editor
    $ gem install bundler
    $ bundle install
    $ SIMPLE_COV=true bundle exec guard

License

This gem is available as open source under the terms of the MIT licence.

Copyright (c) 2018 Sage Group Plc. All rights reserved.

About

I18n Yaml Editor makes it easy to translate your Rails I18N files and keep them up to date

Resources

License

Stars

Watchers

Forks

Packages

No packages published