Production-grade Rails i18n toolchain. Built at Bobadilla Technologies and running in production across multiple client apps, including Requiems API.
Full replacement for i18n-tasks write commands, plus capabilities it lacks:
- Extract hardcoded strings from ERB/Ruby and inject
t()calls automatically - Merge sentence fragments split across ERB interpolations into a single
t()call - Translate missing keys via Google Cloud Translation with brand-name protection
- Rename a key across YAML and all source callers in one command
- Deduplicate identical strings across files and consolidate them to
shared.*
Also covers everything i18n-tasks does: lint, audit, prune.
gem "rori18n-rails", group: :developmentbundle install
bundle exec rails g rori18n:install
bin/rori18n generate --fix --root .The binary is downloaded automatically on first run and cached locally. Supported platforms: macOS (Apple Silicon, Intel), Linux (x86_64).
Requirements: a Rails app with a config/locales/{lang}/ layout. A Google
Cloud Translation API service account key is only needed for the translate
command.
Full command reference, workflow walkthrough, and CI recipes: gem/README.md
<!-- Before -->
<h1>Welcome back</h1>
<p>Hello <%= current_user.name %>, you have <%= count %> messages.</p>bin/rori18n generate --fix --root . # extract + inject t() calls
bin/rori18n merge-fragments --fix --root . # merge the sentence fragment<!-- After -->
<h1><%= t('.welcome_back') %></h1>
<p><%= t('.greeting', name: current_user.name, count: count) %></p>The app behaves identically after this step β only source and YAML change. Then translate:
export GOOGLE_APPLICATION_CREDENTIALS=service-account.json
bin/rori18n translate --root . --to es,fr| Feature | rori18n | i18n-tasks |
|---|---|---|
| Extract hardcoded strings from ERB | β
report, generate |
β |
Inject t() calls into source |
β
generate --fix |
β |
| Merge ERB sentence fragments | β
merge-fragments |
β |
| Translate missing keys | β
translate (Google API) |
β (multiple backends) |
Lint undefined t() calls |
β
lint |
β
health / missing |
| Prune orphaned keys | β
prune |
β
remove-unused |
| Rename keys + update callers | β
refactor-key |
β
mv |
| Deduplicate shared values | β
consolidate |
β |
| Rails integration | Ruby gem, auto-installed binary | Ruby gem in Gemfile |
i18n-tasks is still useful as a passive health checker
(bundle exec i18n-tasks health) because its Prism-based scanner handles some
Rails-specific patterns (before_actions, model translations) that rori18n's
static scanner does not. Run rori18n for all write operations; use i18n-tasks
health-only in CI.
The rori18n binary works standalone against any config/locales/ tree:
go install github.com/bobadilla-tech/rori18n@latest
export PATH="$PATH:$(go env GOPATH)/bin"
rori18n report --root <app-root>- gem/README.md β full command reference, workflow, CI
- docs/core/ARCHITECTURE.md β package internals
- docs/core/CONTRIBUTING.md β dev setup, release process, adding commands