Readme.md in fast_gettext-2.0.2 vs Readme.md in fast_gettext-2.0.3
- old
+ new
@@ -124,11 +124,11 @@
```ruby
p_('File', 'Open') == _("File\004Open") == "öffnen"
p_('Context', 'not-found') == 'not-found'
```
-#### `s_()` or `sgetext()`: translation with namespace
+#### `s_()` or `sgettext()`: translation with namespace
```ruby
s_('File|Open') == _('File|Open') == "öffnen"
s_('Context|not-found') == 'not-found'
```
@@ -151,17 +151,17 @@
sn_('Fruit|Apple', 'Apples', 1) == 'Apfel'
```
#### `N_()` and `Nn_()`: make dynamic translations available to the parser.
-In many instances, your strings will not be found the by the ruby-parse. These methods
+In many instances, your strings will not be found by the ruby parsing. These methods
allow for those strings to be discovered.
```
N_("active"); N_("inactive"); N_("paused") # possible value of status for parser to find.
Nn_("active", "inactive", "paused") # alternative method
-_("Your account is %{account_state}.") % { account_state: status }
+_("Your account is %{account_state}.") % { account_state: _(status) }
```
Managing translations
=====================
@@ -178,11 +178,11 @@
Use the [original GetText](http://github.com/ruby-gettext/gettext) to create and manage po/mo-files.
(Work on a po/mo parser & reader that is easier to use has started, contributions welcome @ [get_pomo](http://github.com/grosser/get_pomo) )
### Database
[Example migration for ActiveRecord](http://github.com/grosser/fast_gettext/blob/master/examples/db/migration.rb)<br/>
-The default plural separator is `||||` but you may overwrite it (or suggest a better one..).
+The default plural separator is `||||` but you may overwrite it (or suggest a better one...).
This is usable with any model DataMapper/Sequel or any other(non-database) backend, the only thing you need to do is respond to the self.translation(key, locale) call.
If you want to use your own models, have a look at the [default models](http://github.com/grosser/fast_gettext/tree/master/lib/fast_gettext/translation_repository/db_models) to see what you want/need to implement.
To manage translations via a Web GUI, use a [Rails application and the translation_db_engine](http://github.com/grosser/translation_db_engine)
@@ -303,11 +303,11 @@
If the Logger is in position #1 it will see all translations, if it is in position #2 it will only see the unfound.
Unfound may not always mean missing, if you choose not to translate a word because the key is a good translation, it will appear nevertheless.
A lambda or anything that responds to `call` will do as callback. A good starting point may be `examples/missing_translations_logger.rb`.
### Plugins
-Want a xml version ?
+Want an xml version?
Write your own TranslationRepository!
```Ruby
# fast_gettext/translation_repository/wtf.rb
module FastGettext
@@ -360,10 +360,10 @@
Alternatively you can use [merge repository](https://github.com/grosser/fast_gettext#merge) to achieve the same behavior.
#### Block defaults
-All the translation methods (includ MultiDomain) support a block default, a feature not provided by ruby-gettext. When a translation is
+All the translation methods (including MultiDomain) support a block default, a feature not provided by ruby-gettext. When a translation is
not found, if a block is provided the block is always returned. Otherwise, a key is returned. Methods doing pluralization will attempt a simple translation of alternate keys.
```ruby
_('not-found'){ "alternative default" } == alternate default
```