translation 1.12 → 1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/lib/translation_io/client/sync_operation.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0996e9a0abfdaf72b371f4eec7d9a9e1bd75f8a
|
4
|
+
data.tar.gz: 3914c3b256f65f209647084328428a9e9fe66d10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b859ce80f4c38534ad1d0b1040c841a69573557f06c207a1419cd2dd93e64f15b1fb3777a566952533dd3e7f458a8c1b991a0d50d17f592d5e9956912d2931f
|
7
|
+
data.tar.gz: c5f40af5277977307397f7fa1364699f192301ca916eff27b8d4f89e6222df9e453717cce34476ebab41f66954ee9d72cf54c92fc240432ed7d3825e1ea126df
|
data/README.md
CHANGED
@@ -114,7 +114,7 @@ np_("context", "singular text", "plural text", number)
|
|
114
114
|
_('%{city1} is bigger than %{city2}') % { city1: "NYC", city2: "BXL" }
|
115
115
|
```
|
116
116
|
|
117
|
-
More information about GetText
|
117
|
+
More information about GetText syntax [here](https://github.com/ruby-gettext/gettext#usage).
|
118
118
|
|
119
119
|
## Usage
|
120
120
|
|
@@ -146,6 +146,8 @@ Warning: all keys that are not present in the current branch will be **permanent
|
|
146
146
|
|
147
147
|
The `TranslationIO.configure` block in `config/initializers/translation.rb` can take several optional configuration options.
|
148
148
|
|
149
|
+
Some options are described below but for an exhaustive list, please refer to [config.rb](https://github.com/aurels/translation-gem/blob/master/lib/translation_io/config.rb).
|
150
|
+
|
149
151
|
#### Disable GetText
|
150
152
|
|
151
153
|
Sometimes, you only want to use YAML and don't want to be bothered by GetText at all.
|
@@ -212,13 +214,13 @@ in the same place and that's bad. For example: date formats, number separators,
|
|
212
214
|
currency or measure units, etc.
|
213
215
|
|
214
216
|
A translator is supposed to translate, not localize. That's not his role to choose how you want your dates or
|
215
|
-
numbers to be displayed, right
|
217
|
+
numbers to be displayed, right? Moreover, this special keys often contain special constructions (e.g.,
|
216
218
|
with percent signs or spaces) that he might break.
|
217
219
|
|
218
220
|
We think localization is part of the configuration of the app and it should not reach the translator UI at all.
|
219
221
|
That's why these localization keys are detected and separated on a dedicated YAML file with Translation.io.
|
220
222
|
|
221
|
-
We automatically
|
223
|
+
We automatically treat [known localization keys](lib/translation_io/yaml_entry.rb), but if you would like
|
222
224
|
to add some more, use the `localization_key_prefixes` option.
|
223
225
|
|
224
226
|
For example:
|
@@ -82,7 +82,7 @@ module TranslationIO
|
|
82
82
|
puts
|
83
83
|
|
84
84
|
yaml_unused_segments.each do |yaml_unused_segment|
|
85
|
-
puts "
|
85
|
+
puts "[#{yaml_unused_segment['languages']}] [#{yaml_unused_segment['msgctxt']}] \"#{yaml_unused_segment['msgid']}\""
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -93,7 +93,7 @@ module TranslationIO
|
|
93
93
|
puts
|
94
94
|
|
95
95
|
gettext_unused_segments.each do |gettext_unused_segment|
|
96
|
-
puts "
|
96
|
+
puts "[#{gettext_unused_segment['languages']}] \"#{gettext_unused_segment['msgid']}\""
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: translation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.13'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aurelien Malisart
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-02-
|
12
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gettext
|