Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

translations

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

translations

  • 0.3.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Translations

Edit your translation files in a synchronized way.

Naming

  1. One translation is your master. This file is always complete and serves as a reference for the slaves.
  2. All translations that are not master are slaves. This means that they may not be up-to-date and can be synchronized with the master using translate.

The default master is en, but you may alter it using the -m <locale> switch.

Usage

Currently there are some commands to alter your translation files:

  • add: Add a new key to all your files
  • update: Update a key in a single file
  • change: Change the meaning of a key in a way that requires a re-translation for all locales
  • move: Move a key around
  • remove: Remove a key from all files
  • translate: Translate all keys that are missing from a given file

And there are commands to view your translations:

  • view: View all translations for a given key
  • validate: Validate that a translations has all keys, that are in the master

For more info just run translations help <command>.

Requirements

  • All your translations are stored in YAML format and one file per locale called <locale>.yml
  • Optimally you work in a rails project, e.g. your translations are stored in config/locales, but you may alter this location with -d <directory>
  • Optimally you have a master

Missing/Coming Features

The following features (or whatever comes to your mind) will probably be implemented in the next time:

  • Support for Pluralizations
  • Support for Cascading

Installation

Add this line to your application's Gemfile:

gem 'translations'

And then execute:

$ bundle

Or install it yourself as:

$ gem install translations

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 06 Oct 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc