doc/i18n.md in hammer_cli-0.1.0 vs doc/i18n.md in hammer_cli-0.1.1
- old
+ new
@@ -1,6 +1,6 @@
-Internacionalization
+Internationalization
--------------------
Hammer uses [fast gettext](https://github.com/grosser/fast_gettext) for string translations. Most of the localization magic
is done for you in hammer already. If you want your plugin to support i18n it needs to register it's translation domain
at hammer's i18n module:
@@ -44,11 +44,11 @@
# register the domain
HammerCLI::I18n.add_domain(HammerCLIAwesomePlugin::I18n::LocaleDomain.new)
```
Then you have to export strings, translate them and place the files in a directory structure.
-Inspiration on how to export the translations can be found in the hammer's [Rakefile](../Rakefile).
+Inspiration on how to export the translations can be found in hammer's [Rakefile](../Rakefile).
Typical directory structure for translation files look like this:
```
locale
├── de
@@ -63,10 +63,10 @@
```
### Translation tips
-When writing a code with translations make sure you keep two following rules:
+When writing code with translations make sure you keep two following rules:
1) Don't use variables directly in the strings and make formatting substitutions outside the gettext function `_("...")`.
```ruby
# WRONG
puts _("Hello #{name}")