Skip to content

Commit

Permalink
Merge pull request #171 from neohunter/master
Browse files Browse the repository at this point in the history
fixes to README file
  • Loading branch information
grosser authored Nov 2, 2024
2 parents e1b4ae1 + d901367 commit 2ff4689
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,25 @@ gem 'gettext', '>=3.0.2', :require => false
Add the first language using:

```Bash
rake gettext:add_language[XX]
rake gettext:add_language[xx]
```

or

```Bash
LANGUAGE=[XX] rake gettext:add_language
LANGUAGE=[xx] rake gettext:add_language
```

where XX is the [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 2-letter code for the language you want to create.
where `xx` is the lowercased [ISO 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) 2-letter code for the language you want to create.

This will also create the `locale` directory (where the translations are being stored) and run `gettext:find` to find any strings marked for translation.
for example:

```Bash
rake gettext:add_language[es]
```


This will also create the `locales` directory (where the translations are being stored) and run `gettext:find` to find any strings marked for translation.

You can, of course, add more languages using the same command.

Expand Down
1 change: 1 addition & 0 deletions lib/gettext_i18n_rails/model_attributes_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def store_model_attributes(options)
end
end
f.puts "#DO NOT MODIFY! AUTOMATICALLY GENERATED FILE!"
f.puts "{}"
end
rescue
puts "[Error] Attribute extraction failed. Removing incomplete file (#{file})"
Expand Down

0 comments on commit 2ff4689

Please sign in to comment.