Project

i18n_flow

0.01
No commit activity in last 3 years
No release in over 3 years
Manage translation status in yaml file
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
>= 0
>= 0
~> 10.0
~> 3.7

Runtime

>= 3.0
 Project Readme

i18n_flow (beta)

Build Status License

Manage translation status in YAML file.
With an official tag feature, i18n_flow enables you to annotate status information directly in YAML file.

Setup

Installation

Add this line to your Gemfile:

gem 'i18n_flow'

# To use the latest version:
gem 'i18n_flow', github: 'creasty/i18n_flow'

Configuration

Create a configuration file at your project's root directory.

$ cat > i18n_flow.yml
base_path: config/locales
glob_patterns:
  - '**/*.yml'
valid_locales:
  - en
  - ja
locale_pairs:
  - ['en', 'ja']
^D

CLI

$ i18n_flow
Manage translation status in yaml file

Usage:
    i18n_flow COMMAND [args...]
    i18n_flow [options]

Options:
    -v, --version    Show version
    -h               Show help

Commands:
    lint       Validate files
    format     Format and correct errors
    search     Search contents and keys
    copy       Copy translations and mark as todo
    split      Split a file into proper-sized files
    version    Show version
    help       Show help

Configuration file

# Base directory
# Default: pwd
base_path: config/locales

# Patterns for locale YAML files
# Default: ['*.en.yml']
glob_patterns:
  - '**/*.yml'

# List of all supporting locales
# May want to sync with `I18n.available_locales`
# Default: ['en']
valid_locales:
  - en
  - ja

# List of master-foreign pairs
# Used by the linter to check symmetry
# Default: []
locale_pairs:
  - ['en', 'ja']

# Enabled linters
# Default
linters:
  - file_scope
  - symmetry