You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rails_locale_sorter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rails_locale_sorter

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Rails Locale Sorter

This is a small utility to assist in handling your I18n YAML files in a Ruby on Rails project.

Installation

$ gem install rails_locale_sorter

Creating/Applying Patches

To create a patch, just provide input and output directories, and a "source of truth" locale that will be the template for the other languages.

$ locale_patch path/to/locales path/to/output en.yml

The output directory will now contain a list of YAML files containing missing translations.

Once the strings have been translated, they can be applied back into your project:

$ locale_apply path/to/translated_patches path/to/locales

The patching process also sorts the file's content alphabetically.

Defaults

These commands default to "locales/", "new-locales/", and "en.yml". Meaning that all you need to do to run through the entire process is:

$ cd my_rails_app/config
$ locale_patch
$ locale_apply

Or use the handy, descriptive aliases:

$ cd my_rails_app/config
$ poop
$ scoop

FAQs

Package last updated on 09 Apr 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts