https://github.com/joshnuss/traduire
A utility for translating Rails apps
https://github.com/joshnuss/traduire
multilingual rails ruby translation
Last synced: 3 months ago
JSON representation
A utility for translating Rails apps
- Host: GitHub
- URL: https://github.com/joshnuss/traduire
- Owner: joshnuss
- Created: 2017-02-17T04:25:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-25T05:31:10.000Z (over 9 years ago)
- Last Synced: 2026-01-21T20:15:05.597Z (6 months ago)
- Topics: multilingual, rails, ruby, translation
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Traduire
=================
[](https://travis-ci.org/joshnuss/traduire)
A utility for translating Rails apps.
Locates strings that need translating and localizes them.
Before:
```ruby
# example.rb
puts "Hello World!!"
```
After:
```ruby
# example.rb
puts I18n.t(:hello_world)
# config/locales/en.yml
hello_world: Hello World!!
```
## Installation
$ gem install traduire
## Usage
### Translate a file
$ traduire example.rb
### Translate multiple files
$ traduire **/*.rb **/*.html.erb
### Cherry pick
$ traduire example.rb --patch
## Supported Formats
| Format | Extension | Supported |
| ---------- | ---------- | --------- |
| Ruby | .rb | planned |
| HTML | .html.erb | planned |
| JavaScript | .js | planned |
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/joshnuss/traduire.