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

aigu

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aigu

  • 1.2
  • Rubygems
  • Socket score

Version published
Maintainers
2
Created
Source

Introduction

Aigu is a set of utility to process localization files to generate JSON files to send to Accent as well as taking JSON files from Accent and convert them back to localization files.

Installation

Add these lines to your application’s Gemfile as development dependancies:

group :development do
  gem 'aigu'
end

Usage

Aigu provides an executable named aigu.

Exporting the JSON file for Accent

The export command looks for localization files and generates a JSON file. This file will then be compatible with Accent.

$ aigu <export-command> --locale=fr --input-directory=config/locales --output-file=my-project.json
Commands
CommandFile format
rails-exportRails YAML
android-exportAndroid XML
core-exportJava Enum Core
ios-exportiOS strings & stringsdict
ember-exportEmber.js JavaScript
ember-pod-export Ember.js pods JSON
ember-engine-exportEmber.js Engine JavaScript
Options
OptionDescription
localeThe locale used to find localization files.
input-directoryThe directory used to find localization files
output-fileThe path to the JSON file that will be written by aigu
ignoreThe patterns aigu will use to skip ignored files (eg. routes.yml)

Importing the JSON file from Accent

The import command takes a generated JSON file from Accent and generates localization files in the output directory.

$ aigu <import-command> --locale=fr --input-file=file-from-accent.json --output-directory=config/locales
Commands
CommandFile format
rails-importRails YAML
android-importAndroid XML
core-importJava Enum Core
ios-importiOS strings & stringsdict
ember-importEmber.js JavaScript
ember-pod-importEmber.js pods JSON
ember-engine-importEmber.js Engine JavaScript
Options
OptionDescription
localeThe locale used to generate localization files. Files will be generated as <file>.<locale>.yml
input-fileThe path to the Accent-generated JSON file
output-directoryThe directory where the localization YAML files will be generated

Using .aigu.yml

Instead of using command-line arguments when running the aigu command, you can create a .aigu.yml file at the root of your project and hard-code options in that file.

ignore:
  - routes.yml
  - rails/**/*.yml
output-directory: config/locales
input-directory: config/locales

Contributing

We’re using phare to make sure all Ruby code adheres to our coding style guide. The best way to use phare is as a pre-commit hook:

$ ln -s "`pwd`/bin/phare" .git/hooks/pre-commit

That way, whenever git commit is ran, phare will be executed and will abort the commit if there are errors.

License

Aigu is © 2014-2017 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We're a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

We also love open-source software and we try to give back to the community as much as we can.

FAQs

Package last updated on 15 May 2018

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