i18n-tasks 0.2.18 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/README.md +12 -11
- data/i18n-tasks.gemspec +3 -1
- data/lib/i18n/tasks/version.rb +1 -1
- data/lib/tasks/i18n-tasks.rake +3 -3
- 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: c8a1d39250f5a17141d7e2ef77087cfbb2350723
|
4
|
+
data.tar.gz: 4c24ee7926d87036337ef73c85fd19963f512c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fda620af8e5ed8bb3481d2aa64f7961086eed48ad8958f28f54df723bec60e35f2ad006f01d33e9a51abdd0ce1bf338741c9959cc1c5d286e6f93a8026f6d1c1
|
7
|
+
data.tar.gz: 8f971a9e3024f79310958b5701e9ec255fb14278e3e90464338c42a097cc5fbcbfeaa3e8455975ad5651fc0ceb494f7a5f6c88bce37eecb3d387f8d1871547ce
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
@@ -16,12 +16,6 @@ rake i18n:missing
|
|
16
16
|
rake i18n:unused
|
17
17
|
```
|
18
18
|
|
19
|
-
You can also export missing and unused data to XLSX though there is no importer yet:
|
20
|
-
|
21
|
-
```bash
|
22
|
-
rake i18n:spreadsheet_report
|
23
|
-
```
|
24
|
-
|
25
19
|
To remove unused translations run:
|
26
20
|
|
27
21
|
```bash
|
@@ -34,10 +28,8 @@ To add the keys that are not in the base locale but detected in the source do:
|
|
34
28
|
|
35
29
|
```bash
|
36
30
|
# add missing keys to the base locale data (I18n.default_locale)
|
37
|
-
# values set to key.humanize
|
31
|
+
# values set to to the optional [argument] or key.humanize
|
38
32
|
rake i18n:add_missing
|
39
|
-
# or set all values to the task argument
|
40
|
-
rake i18n:add_missing[OhNoesMissing]
|
41
33
|
```
|
42
34
|
|
43
35
|
Prefill empty translations using Google Translate ([more below on the API key](#translation-config)).
|
@@ -243,9 +235,18 @@ describe 'translation keys' do
|
|
243
235
|
end
|
244
236
|
```
|
245
237
|
|
246
|
-
##
|
238
|
+
## XLSX
|
239
|
+
|
240
|
+
Export missing and unused data to XLSX:
|
241
|
+
|
242
|
+
```bash
|
243
|
+
rake i18n:spreadsheet_report
|
244
|
+
```
|
245
|
+
|
246
|
+
|
247
|
+
## HTML
|
247
248
|
|
248
|
-
While i18n-tasks does not provide an HTML version of the report,
|
249
|
+
While i18n-tasks does not provide an HTML version of the report, you can add [one like this](https://gist.github.com/glebm/6887030).
|
249
250
|
|
250
251
|
---
|
251
252
|
|
data/i18n-tasks.gemspec
CHANGED
@@ -14,7 +14,9 @@ Gem::Specification.new do |s|
|
|
14
14
|
and prefill missing keys. Supports relative and plural keys and Google Translate.
|
15
15
|
}
|
16
16
|
s.homepage = 'https://github.com/glebm/i18n-tasks'
|
17
|
-
s.metadata
|
17
|
+
if s.respond_to?(:metadata=)
|
18
|
+
s.metadata = { 'issue_tracker' => 'https://github.com/glebm/i18n-tasks' }
|
19
|
+
end
|
18
20
|
s.license = 'MIT'
|
19
21
|
|
20
22
|
s.files = `git ls-files`.split($/) - %w(doc/img/i18n-tasks.gif)
|
data/lib/i18n/tasks/version.rb
CHANGED
data/lib/tasks/i18n-tasks.rake
CHANGED
@@ -18,17 +18,17 @@ namespace :i18n do
|
|
18
18
|
|
19
19
|
namespace :missing do
|
20
20
|
desc 'keys present in code but not existing in base locale data'
|
21
|
-
task :not_in_base => 'i18n:setup' do
|
21
|
+
task :not_in_base => 'i18n:setup' do |t, args|
|
22
22
|
i18n_report.missing_translations i18n_tasks.keys_not_in_base_info
|
23
23
|
end
|
24
24
|
|
25
25
|
desc 'keys present but with value same as in base locale'
|
26
|
-
task :eq_base, [:locales] => 'i18n:setup' do
|
26
|
+
task :eq_base, [:locales] => 'i18n:setup' do |t, args|
|
27
27
|
i18n_report.missing_translations i18n_tasks.keys_eq_base_info(i18n_parse_locales args[:locales])
|
28
28
|
end
|
29
29
|
|
30
30
|
desc 'keys that exist in base locale but are blank in passed locales'
|
31
|
-
task :blank, [:locales] => 'i18n:setup' do
|
31
|
+
task :blank, [:locales] => 'i18n:setup' do |t, args|
|
32
32
|
i18n_report.missing_translations i18n_tasks.keys_eq_base_info(i18n_parse_locales args[:locales])
|
33
33
|
end
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|