https://github.com/creasty/i18n_flow
[beta] Manage translation status in YAML file
https://github.com/creasty/i18n_flow
i18n rails ruby translation-management
Last synced: 12 months ago
JSON representation
[beta] Manage translation status in YAML file
- Host: GitHub
- URL: https://github.com/creasty/i18n_flow
- Owner: creasty
- License: mit
- Created: 2018-01-29T13:47:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-15T07:38:42.000Z (almost 6 years ago)
- Last Synced: 2025-06-11T07:53:57.958Z (12 months ago)
- Topics: i18n, rails, ruby, translation-management
- Language: Ruby
- Homepage: https://rubygems.org/gems/i18n_flow
- Size: 153 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

i18n_flow (beta)
================
[](https://travis-ci.org/creasty/i18n_flow)
[](./LICENSE)
**Manage translation status in YAML file.**
With an official [tag](http://www.yaml.org/spec/1.2/spec.html#id2784064) feature, `i18n_flow` enables you to annotate status information directly in YAML file.

- [Lint rules](./doc/rules.md)
- [Tags](./doc/tags.md)
Setup
-----
### Installation
Add this line to your Gemfile:
```ruby
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.
```sh-session
$ cat > i18n_flow.yml
base_path: config/locales
glob_patterns:
- '**/*.yml'
valid_locales:
- en
- ja
locale_pairs:
- ['en', 'ja']
^D
```
CLI
---
```sh-session
$ 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
------------------
```yaml
# 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
```