fast_gettext 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +4 -4
- data/lib/fast_gettext/mo_file.rb +1 -0
- data/lib/fast_gettext/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 183bb8e8189ae58adc5a33621eae23da634f4a68e6629fa705323ce9bd5f97dd
|
4
|
+
data.tar.gz: 2e0a657b867f347e746601a93b615449ef7e1f530bf531f346509e0c9ae8b643
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b735d946318eeafaecc3c817d3c8709e28b1cd9938d32a29c9a1de33fb53ff6cac5a6f224d438c7d6713121aaf23670b8e1ea45201ce4492677126ec0f97cd8c
|
7
|
+
data.tar.gz: ce132742a3a3352546260905e6fcd36c3eac54ae0e27e5f6bfc5ffb69282b33e5d0c64a5f6868a2589481fbfd25e92fe29a412217942a54019ea3dd31c378394
|
data/Readme.md
CHANGED
@@ -95,8 +95,8 @@ FastGettext.locale = 'de'
|
|
95
95
|
|
96
96
|
### 4. Start translating
|
97
97
|
|
98
|
-
|
99
|
-
(to get `*gettext` methods, use `
|
98
|
+
FastGettext supports all the translation methods of [ruby-gettext](http://github.com/ruby-gettext/gettext) with added support for block defaults.
|
99
|
+
(to get `*gettext` methods, use `FastGettext::TranslationAliased`)
|
100
100
|
|
101
101
|
#### `_()` or `gettext()`: basic translation
|
102
102
|
|
@@ -116,7 +116,7 @@ n_('Car', 'Cars', 2) == 'Autos' # German plural of Cars
|
|
116
116
|
You'll often want to interpolate the results of `n_()` using ruby builtin `%` operator.
|
117
117
|
|
118
118
|
```ruby
|
119
|
-
n_('Car', '
|
119
|
+
n_('Car', '%{n} Cars', 2) % { n: count } == '2 Autos'
|
120
120
|
```
|
121
121
|
|
122
122
|
#### `p_()` or `pgettext()`: translation with context
|
@@ -159,7 +159,7 @@ allow for those strings to be discovered.
|
|
159
159
|
```
|
160
160
|
N_("active"); N_("inactive"); N_("paused") # possible value of status for parser to find.
|
161
161
|
Nn_("active", "inactive", "paused") # alternative method
|
162
|
-
_("Your account is
|
162
|
+
_("Your account is %{account_state}.") % { account_state: status }
|
163
163
|
```
|
164
164
|
|
165
165
|
|
data/lib/fast_gettext/mo_file.rb
CHANGED
data/lib/fast_gettext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_gettext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|