i18n-tasks 0.6.3 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +2 -1
- data/README.md +80 -78
- data/bin/i18n-tasks +24 -30
- data/config/i18n-tasks.yml +87 -0
- data/config/locales/en.yml +95 -0
- data/i18n-tasks.gemspec +1 -0
- data/lib/i18n/tasks.rb +10 -0
- data/lib/i18n/tasks/base_task.rb +6 -2
- data/lib/i18n/tasks/command/collection.rb +18 -0
- data/lib/i18n/tasks/command/commander.rb +72 -0
- data/lib/i18n/tasks/command/commands/data.rb +73 -0
- data/lib/i18n/tasks/command/commands/eq_base.rb +20 -0
- data/lib/i18n/tasks/command/commands/health.rb +26 -0
- data/lib/i18n/tasks/command/commands/meta.rb +35 -0
- data/lib/i18n/tasks/command/commands/missing.rb +73 -0
- data/lib/i18n/tasks/command/commands/tree.rb +92 -0
- data/lib/i18n/tasks/command/commands/usages.rb +70 -0
- data/lib/i18n/tasks/command/commands/xlsx.rb +27 -0
- data/lib/i18n/tasks/command/dsl.rb +27 -0
- data/lib/i18n/tasks/command/dsl/cmd.rb +19 -0
- data/lib/i18n/tasks/command/dsl/cmd_opt.rb +19 -0
- data/lib/i18n/tasks/command/dsl/enum_opt.rb +26 -0
- data/lib/i18n/tasks/command/options/common.rb +48 -0
- data/lib/i18n/tasks/command/options/enum_opt.rb +44 -0
- data/lib/i18n/tasks/command/options/list_opt.rb +11 -0
- data/lib/i18n/tasks/command/options/locales.rb +47 -0
- data/lib/i18n/tasks/command/options/trees.rb +101 -0
- data/lib/i18n/tasks/command_error.rb +3 -0
- data/lib/i18n/tasks/commands.rb +22 -169
- data/lib/i18n/tasks/configuration.rb +1 -16
- data/lib/i18n/tasks/console_context.rb +1 -1
- data/lib/i18n/tasks/data.rb +13 -8
- data/lib/i18n/tasks/data/file_formats.rb +29 -18
- data/lib/i18n/tasks/data/file_system_base.rb +35 -4
- data/lib/i18n/tasks/data/router/conservative_router.rb +18 -11
- data/lib/i18n/tasks/data/tree/node.rb +5 -15
- data/lib/i18n/tasks/data/tree/nodes.rb +0 -3
- data/lib/i18n/tasks/data/tree/siblings.rb +32 -2
- data/lib/i18n/tasks/data/tree/traversal.rb +117 -96
- data/lib/i18n/tasks/google_translation.rb +25 -25
- data/lib/i18n/tasks/html_keys.rb +10 -0
- data/lib/i18n/tasks/key_pattern_matching.rb +1 -0
- data/lib/i18n/tasks/locale_list.rb +19 -0
- data/lib/i18n/tasks/missing_keys.rb +32 -33
- data/lib/i18n/tasks/plural_keys.rb +1 -1
- data/lib/i18n/tasks/reports/base.rb +4 -9
- data/lib/i18n/tasks/reports/spreadsheet.rb +5 -5
- data/lib/i18n/tasks/reports/terminal.rb +62 -38
- data/lib/i18n/tasks/scanners/base_scanner.rb +5 -4
- data/lib/i18n/tasks/slop_command.rb +27 -0
- data/lib/i18n/tasks/stats.rb +20 -0
- data/lib/i18n/tasks/string_interpolation.rb +14 -0
- data/lib/i18n/tasks/unused_keys.rb +0 -10
- data/lib/i18n/tasks/version.rb +1 -1
- data/spec/commands/data_commands_spec.rb +38 -0
- data/spec/commands/tree_commands_spec.rb +68 -0
- data/spec/fixtures/app/views/index.html.slim +1 -0
- data/spec/google_translate_spec.rb +5 -3
- data/spec/i18n_spec.rb +18 -0
- data/spec/i18n_tasks_spec.rb +8 -8
- data/spec/spec_helper.rb +3 -3
- data/spec/support/test_codebase.rb +4 -1
- data/spec/used_keys_spec.rb +7 -7
- data/templates/config/i18n-tasks.yml +2 -2
- metadata +48 -4
- data/lib/i18n/tasks/commands_base.rb +0 -107
- data/lib/i18n/tasks/fill_tasks.rb +0 -40
@@ -0,0 +1,20 @@
|
|
1
|
+
module I18n::Tasks
|
2
|
+
module Stats
|
3
|
+
def forest_stats(forest)
|
4
|
+
key_count = forest.leaves.count
|
5
|
+
locale_count = forest.count
|
6
|
+
if key_count.zero?
|
7
|
+
{key_count: 0}
|
8
|
+
else
|
9
|
+
{
|
10
|
+
locales: forest.map(&:key).join(', '),
|
11
|
+
key_count: key_count,
|
12
|
+
locale_count: locale_count,
|
13
|
+
per_locale_avg: forest.inject(0) { |sum, f| sum + f.leaves.count } / locale_count,
|
14
|
+
key_segments_avg: '%.1f' % (forest.leaves.inject(0) { |sum, node| sum + node.walk_to_root.count - 1 } / key_count.to_f),
|
15
|
+
value_chars_avg: forest.leaves.inject(0) { |sum, node| sum + node.value.length } / key_count
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -18,16 +18,6 @@ module I18n
|
|
18
18
|
!used_key?(depluralize_key(key, locale))
|
19
19
|
}
|
20
20
|
end
|
21
|
-
|
22
|
-
def remove_unused!(locales = nil)
|
23
|
-
locales ||= self.locales
|
24
|
-
locales.each do |locale|
|
25
|
-
unused = unused_tree(locale).key_names.to_set
|
26
|
-
data[locale] = data[locale].select_keys { |key, value|
|
27
|
-
!unused.include?(depluralize_key(key, locale))
|
28
|
-
}
|
29
|
-
end
|
30
|
-
end
|
31
21
|
end
|
32
22
|
end
|
33
23
|
end
|
data/lib/i18n/tasks/version.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Data commands' do
|
4
|
+
delegate :run_cmd, to: :TestCodebase
|
5
|
+
def en_data
|
6
|
+
{'en' => {'a' => '1', 'common' => {'hello' => 'Hello'}}}
|
7
|
+
end
|
8
|
+
|
9
|
+
def en_data_2
|
10
|
+
{'en' => {'common' => {'hi' => 'Hi'}}}
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
before do
|
15
|
+
TestCodebase.setup('config/locales/en.yml' => en_data.to_yaml)
|
16
|
+
end
|
17
|
+
|
18
|
+
after do
|
19
|
+
TestCodebase.teardown
|
20
|
+
end
|
21
|
+
|
22
|
+
it '#data' do
|
23
|
+
expect(JSON.parse(run_cmd :data, format: 'json')).to eq(en_data)
|
24
|
+
end
|
25
|
+
|
26
|
+
it '#data-merge' do
|
27
|
+
expect(JSON.parse(run_cmd :data_merge, format: 'json', arguments: [en_data_2.to_json], nostdin: true)).to eq(en_data.deep_merge en_data_2)
|
28
|
+
end
|
29
|
+
|
30
|
+
it '#data-write' do
|
31
|
+
expect(JSON.parse(run_cmd :data_write, format: 'json', arguments: [en_data_2.to_json])).to eq(en_data_2)
|
32
|
+
end
|
33
|
+
|
34
|
+
it '#data-remove' do
|
35
|
+
to_remove = {'en' => {'common' => {'hello' => ''}}}
|
36
|
+
expect(JSON.parse(run_cmd :data_remove, format: 'json', arguments: [to_remove.to_json])).to eq('en' => {'common' => en_data['en']['common'] })
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Tree commands' do
|
4
|
+
delegate :run_cmd, to: :TestCodebase
|
5
|
+
before do
|
6
|
+
TestCodebase.setup
|
7
|
+
end
|
8
|
+
|
9
|
+
after do
|
10
|
+
TestCodebase.teardown
|
11
|
+
end
|
12
|
+
|
13
|
+
context 'tree-merge' do
|
14
|
+
trees = [{'a' => '1', 'b' => '2'}, {'a' => '-1', 'c' => '3'}]
|
15
|
+
it trees.map(&:to_json).join(', ') do
|
16
|
+
merged = JSON.parse run_cmd(:tree_merge, format: 'json', arguments: trees.map(&:to_json), nostdin: true)
|
17
|
+
expect(merged).to eq trees.reduce(:merge)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context 'tree-filter' do
|
22
|
+
forest = {'a' => '1', 'b' => '2', 'c' => {'a' => '3'}}
|
23
|
+
pattern = '{a,c.*}'
|
24
|
+
it "-p #{pattern.inspect} #{forest.to_json}" do
|
25
|
+
selected = JSON.parse run_cmd(:tree_filter, format: 'json', pattern: pattern, arguments: [forest.to_json])
|
26
|
+
expect(selected).to eq(forest.except('b'))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'tree-subtract' do
|
31
|
+
trees = [{'a' => '1', 'b' => '2'}, {'a' => '-1', 'c' => '3'}]
|
32
|
+
it trees.map(&:to_json).join(' - ') do
|
33
|
+
subtracted = JSON.parse run_cmd(:tree_subtract, format: 'json', arguments: trees.map(&:to_json), nostdin: true)
|
34
|
+
expected = {'b' => '2'}
|
35
|
+
expect(subtracted).to eq expected
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'tree-rename-key' do
|
40
|
+
def forest
|
41
|
+
{'a' => {'b' => {'a' => '1'}}}
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'renames root node' do
|
45
|
+
renamed = JSON.parse run_cmd(:tree_rename_key, key: 'a', name: 'x', format: 'json', arguments: [forest.to_json])
|
46
|
+
expect(renamed).to eq(forest.tap { |f| f['x'] = f.delete('a') })
|
47
|
+
end
|
48
|
+
it 'renames node' do
|
49
|
+
renamed = JSON.parse run_cmd(:tree_rename_key, key: 'a.b', name: 'x', format: 'json', arguments: [forest.to_json])
|
50
|
+
expect(renamed).to eq(forest.tap { |f| f['a']['x'] = f['a'].delete('b') })
|
51
|
+
end
|
52
|
+
it 'renames leaf' do
|
53
|
+
renamed = JSON.parse run_cmd(:tree_rename_key, key: 'a.b.a', name: 'x', format: 'json', arguments: [forest.to_json])
|
54
|
+
expect(renamed).to eq(forest.tap { |f| f['a']['b']['x'] = f['a']['b'].delete('a') })
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context 'tree-convert' do
|
59
|
+
def forest
|
60
|
+
{'x' => '1', 'a' => {'b' => {'a' => '2'}}}
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'converts to keys' do
|
64
|
+
keys = run_cmd(:tree_convert, from: 'json', to: 'keys', arguments: [forest.to_json]).split("\n")
|
65
|
+
expect(keys.sort).to eq(['a.b.a', 'x'].sort)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -8,6 +8,7 @@ p #{t 'ca.d'} #{t 'ca.f', i: 'world'} #{t 'ca.e', i: 'world'}
|
|
8
8
|
p #{t 'missing_in_es.a'} #{t 'same_in_es.a'} #{t 'blank_in_es.a'}
|
9
9
|
p = t 'used_but_missing.key'
|
10
10
|
p = t 'missing-key-with-a-dash.key'
|
11
|
+
p = t 'missing-key-question?.key'
|
11
12
|
p = t 'x', scope: 'scoped'
|
12
13
|
p = t 'x', scope: [:very, :scoped]
|
13
14
|
p = t 'x', scope: [:scoped, code]
|
@@ -16,10 +16,10 @@ describe 'Google Translation' do
|
|
16
16
|
describe 'real world test' do
|
17
17
|
delegate :i18n_cmd, :i18n_task, :in_test_app_dir, to: :TestCodebase
|
18
18
|
|
19
|
-
context '
|
19
|
+
context '#google_translate_list' do
|
20
20
|
it "works with #{tests.map(&:first)}" do
|
21
21
|
# Just one test with all the cases to lower the Google bill
|
22
|
-
translations =
|
22
|
+
translations = google_translate_list(
|
23
23
|
tests.map { |t| t[0..1] }, from: :en, to: :es, key: ENV['GOOGLE_TRANSLATE_API_KEY'])
|
24
24
|
expect(translations).to eq(tests.map { |t| [t[0], t[2]] })
|
25
25
|
end
|
@@ -43,7 +43,8 @@ describe 'Google Translation' do
|
|
43
43
|
'common' => {
|
44
44
|
'a' => 'λ',
|
45
45
|
'hello' => text_test[1],
|
46
|
-
'hello_html' => html_test[1]
|
46
|
+
'hello_html' => html_test[1],
|
47
|
+
'array_key' => array_test[1]
|
47
48
|
}
|
48
49
|
})
|
49
50
|
task.data[:es] = build_tree('es' =>{
|
@@ -55,6 +56,7 @@ describe 'Google Translation' do
|
|
55
56
|
cmd.translate_missing
|
56
57
|
expect(task.t('common.hello', 'es')).to eq(text_test[2])
|
57
58
|
expect(task.t('common.hello_html', 'es')).to eq(html_test[2])
|
59
|
+
expect(task.t('common.array_key', 'es')).to eq(array_test[2])
|
58
60
|
expect(task.t('common.a', 'es')).to eq('λ')
|
59
61
|
end
|
60
62
|
end
|
data/spec/i18n_spec.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'i18n/tasks'
|
3
|
+
|
4
|
+
describe 'I18n' do
|
5
|
+
let(:i18n) { I18n::Tasks::BaseTask.new }
|
6
|
+
let(:missing_keys) { i18n.missing_keys }
|
7
|
+
let(:unused_keys) { i18n.unused_keys }
|
8
|
+
|
9
|
+
it 'does not have missing keys' do
|
10
|
+
expect(missing_keys).to be_empty,
|
11
|
+
"Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them"
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'does not have unused keys' do
|
15
|
+
expect(i18n.unused_keys).to be_empty,
|
16
|
+
"#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them"
|
17
|
+
end
|
18
|
+
end
|
data/spec/i18n_tasks_spec.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
require 'spec_helper'
|
3
|
-
require 'i18n/tasks/commands'
|
4
3
|
require 'fileutils'
|
5
4
|
|
6
5
|
describe 'i18n-tasks' do
|
@@ -15,6 +14,7 @@ describe 'i18n-tasks' do
|
|
15
14
|
en.missing_symbol_key en.missing_symbol.key_two en.missing_symbol.key_three
|
16
15
|
es.missing_in_es_plural_1.a es.missing_in_es_plural_2.a
|
17
16
|
en.missing-key-with-a-dash.key
|
17
|
+
en.missing-key-question?.key
|
18
18
|
en.fn_comment en.only_in_es
|
19
19
|
)
|
20
20
|
}
|
@@ -103,12 +103,12 @@ describe 'i18n-tasks' do
|
|
103
103
|
}
|
104
104
|
run_cmd :add_missing, locales: 'base'
|
105
105
|
in_test_app_dir {
|
106
|
-
expect(YAML.load_file('config/locales/en.yml')['en']['used_but_missing']['key']).to eq '
|
107
|
-
expect(YAML.load_file('config/locales/en.yml')['en']['present_in_es_but_not_en']['a']).to eq '
|
106
|
+
expect(YAML.load_file('config/locales/en.yml')['en']['used_but_missing']['key']).to eq I18n.t('i18n_tasks.common.key')
|
107
|
+
expect(YAML.load_file('config/locales/en.yml')['en']['present_in_es_but_not_en']['a']).to eq 'ES_TEXT'
|
108
108
|
}
|
109
109
|
end
|
110
110
|
|
111
|
-
it 'default
|
111
|
+
it 'default value: base_value for non-base locale' do
|
112
112
|
in_test_app_dir {
|
113
113
|
expect(YAML.load_file('config/locales/es.yml')['es']['missing_in_es']).to be_nil
|
114
114
|
}
|
@@ -119,12 +119,12 @@ describe 'i18n-tasks' do
|
|
119
119
|
}
|
120
120
|
end
|
121
121
|
|
122
|
-
it '
|
122
|
+
it '--value' do
|
123
123
|
in_test_app_dir {
|
124
124
|
expect(YAML.load_file('config/locales/es.yml')['es']['missing_in_es']).to be_nil
|
125
125
|
}
|
126
126
|
run_cmd :normalize, pattern_router: true
|
127
|
-
run_cmd :add_missing, locales: 'all',
|
127
|
+
run_cmd :add_missing, locales: 'all', value: 'TRME'
|
128
128
|
in_test_app_dir {
|
129
129
|
expect(YAML.load_file('config/locales/es.yml')['es']['missing_in_es']['a']).to eq 'TRME'
|
130
130
|
expect(YAML.load_file('config/locales/devise.es.yml')['es']['devise']['a']).to eq 'ES_TEXT'
|
@@ -132,11 +132,11 @@ describe 'i18n-tasks' do
|
|
132
132
|
}
|
133
133
|
end
|
134
134
|
|
135
|
-
it '
|
135
|
+
it '--value with %{value}' do
|
136
136
|
in_test_app_dir {
|
137
137
|
expect(YAML.load_file('config/locales/es.yml')['es']['missing_in_es']).to be_nil
|
138
138
|
}
|
139
|
-
run_cmd :add_missing, locales: 'all',
|
139
|
+
run_cmd :add_missing, locales: 'all', value: 'TRME %{value}'
|
140
140
|
in_test_app_dir {
|
141
141
|
expect(YAML.load_file('config/locales/es.yml')['es']['missing_in_es']['a']).to eq 'TRME EN_TEXT'
|
142
142
|
expect(YAML.load_file('config/locales/en.yml')['en']['present_in_es_but_not_en']['a']).to eq 'TRME ES_TEXT'
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
ENV['RAILS_ENV'] = ENV['RAKE_ENV'] = 'test'
|
3
3
|
|
4
|
-
|
5
|
-
require '
|
6
|
-
|
4
|
+
if ENV['TRAVIS'] && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx')
|
5
|
+
require 'codeclimate-test-reporter'
|
6
|
+
CodeClimate::TestReporter.start
|
7
7
|
end
|
8
8
|
|
9
9
|
$: << File.expand_path('../lib', __FILE__)
|
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'yaml'
|
4
4
|
require_relative 'capture_std'
|
5
|
+
require 'i18n/tasks/commands'
|
5
6
|
|
6
7
|
module TestCodebase
|
7
8
|
include CaptureStd
|
@@ -22,7 +23,9 @@ module TestCodebase
|
|
22
23
|
|
23
24
|
def run_cmd(name, *args, &block)
|
24
25
|
in_test_app_dir do
|
25
|
-
|
26
|
+
silence_stderr {
|
27
|
+
capture_stdout { i18n_cmd.send(name, *args, &block) }
|
28
|
+
}
|
26
29
|
end
|
27
30
|
end
|
28
31
|
|
data/spec/used_keys_spec.rb
CHANGED
@@ -15,14 +15,14 @@ h1 = t 'b'
|
|
15
15
|
TestCodebase.teardown
|
16
16
|
end
|
17
17
|
|
18
|
-
it '#used_keys(
|
19
|
-
used = task.used_tree(
|
18
|
+
it '#used_keys(source_occurrences: true)' do
|
19
|
+
used = task.used_tree(source_occurrences: true)
|
20
20
|
leaves = used.leaves.to_a
|
21
21
|
expect(leaves.size).to eq 2
|
22
22
|
expect_node_key_data(
|
23
23
|
leaves[0],
|
24
24
|
'a',
|
25
|
-
|
25
|
+
source_occurrences:
|
26
26
|
[{pos: 6, line_num: 1, line_pos: 7, line: "div = t 'a'", src_path: 'a.html.slim'},
|
27
27
|
{pos: 18, line_num: 2, line_pos: 7, line: " p = t 'a'", src_path: 'a.html.slim'}]
|
28
28
|
)
|
@@ -30,18 +30,18 @@ h1 = t 'b'
|
|
30
30
|
expect_node_key_data(
|
31
31
|
leaves[1],
|
32
32
|
'b',
|
33
|
-
|
33
|
+
source_occurrences:
|
34
34
|
[{pos: 29, line_num: 3, line_pos: 6, line: "h1 = t 'b'", src_path: 'a.html.slim'}]
|
35
35
|
)
|
36
36
|
end
|
37
37
|
|
38
|
-
it '#used_keys(
|
39
|
-
used_keys = task.used_tree(key_filter: 'b*',
|
38
|
+
it '#used_keys(source_occurrences: true, key_filter: "b*")' do
|
39
|
+
used_keys = task.used_tree(key_filter: 'b*', source_occurrences: true)
|
40
40
|
expect(used_keys.size).to eq 1
|
41
41
|
expect_node_key_data(
|
42
42
|
used_keys.leaves.first,
|
43
43
|
'b',
|
44
|
-
|
44
|
+
source_occurrences:
|
45
45
|
[{pos: 29, line_num: 3, line_pos: 6, line: "h1 = t 'b'", src_path: 'a.html.slim'}]
|
46
46
|
)
|
47
47
|
end
|
@@ -27,8 +27,8 @@ data:
|
|
27
27
|
# YAML / JSON serializer options, passed to load / dump / parse / serialize
|
28
28
|
yaml:
|
29
29
|
write:
|
30
|
-
|
31
|
-
|
30
|
+
# do not wrap lines at 80 characters
|
31
|
+
line_width: -1
|
32
32
|
json:
|
33
33
|
write:
|
34
34
|
# pretty print JSON
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubis
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 3.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: i18n
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: axlsx
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -201,12 +215,32 @@ files:
|
|
201
215
|
- README.md
|
202
216
|
- Rakefile
|
203
217
|
- bin/i18n-tasks
|
218
|
+
- config/i18n-tasks.yml
|
219
|
+
- config/locales/en.yml
|
204
220
|
- i18n-tasks.gemspec
|
205
221
|
- lib/i18n/tasks.rb
|
206
222
|
- lib/i18n/tasks/base_task.rb
|
223
|
+
- lib/i18n/tasks/command/collection.rb
|
224
|
+
- lib/i18n/tasks/command/commander.rb
|
225
|
+
- lib/i18n/tasks/command/commands/data.rb
|
226
|
+
- lib/i18n/tasks/command/commands/eq_base.rb
|
227
|
+
- lib/i18n/tasks/command/commands/health.rb
|
228
|
+
- lib/i18n/tasks/command/commands/meta.rb
|
229
|
+
- lib/i18n/tasks/command/commands/missing.rb
|
230
|
+
- lib/i18n/tasks/command/commands/tree.rb
|
231
|
+
- lib/i18n/tasks/command/commands/usages.rb
|
232
|
+
- lib/i18n/tasks/command/commands/xlsx.rb
|
233
|
+
- lib/i18n/tasks/command/dsl.rb
|
234
|
+
- lib/i18n/tasks/command/dsl/cmd.rb
|
235
|
+
- lib/i18n/tasks/command/dsl/cmd_opt.rb
|
236
|
+
- lib/i18n/tasks/command/dsl/enum_opt.rb
|
237
|
+
- lib/i18n/tasks/command/options/common.rb
|
238
|
+
- lib/i18n/tasks/command/options/enum_opt.rb
|
239
|
+
- lib/i18n/tasks/command/options/list_opt.rb
|
240
|
+
- lib/i18n/tasks/command/options/locales.rb
|
241
|
+
- lib/i18n/tasks/command/options/trees.rb
|
207
242
|
- lib/i18n/tasks/command_error.rb
|
208
243
|
- lib/i18n/tasks/commands.rb
|
209
|
-
- lib/i18n/tasks/commands_base.rb
|
210
244
|
- lib/i18n/tasks/configuration.rb
|
211
245
|
- lib/i18n/tasks/console_context.rb
|
212
246
|
- lib/i18n/tasks/data.rb
|
@@ -221,10 +255,11 @@ files:
|
|
221
255
|
- lib/i18n/tasks/data/tree/nodes.rb
|
222
256
|
- lib/i18n/tasks/data/tree/siblings.rb
|
223
257
|
- lib/i18n/tasks/data/tree/traversal.rb
|
224
|
-
- lib/i18n/tasks/fill_tasks.rb
|
225
258
|
- lib/i18n/tasks/google_translation.rb
|
259
|
+
- lib/i18n/tasks/html_keys.rb
|
226
260
|
- lib/i18n/tasks/ignore_keys.rb
|
227
261
|
- lib/i18n/tasks/key_pattern_matching.rb
|
262
|
+
- lib/i18n/tasks/locale_list.rb
|
228
263
|
- lib/i18n/tasks/locale_pathname.rb
|
229
264
|
- lib/i18n/tasks/logging.rb
|
230
265
|
- lib/i18n/tasks/missing_keys.rb
|
@@ -236,10 +271,15 @@ files:
|
|
236
271
|
- lib/i18n/tasks/scanners/pattern_scanner.rb
|
237
272
|
- lib/i18n/tasks/scanners/pattern_with_scope_scanner.rb
|
238
273
|
- lib/i18n/tasks/scanners/relative_keys.rb
|
274
|
+
- lib/i18n/tasks/slop_command.rb
|
239
275
|
- lib/i18n/tasks/split_key.rb
|
276
|
+
- lib/i18n/tasks/stats.rb
|
277
|
+
- lib/i18n/tasks/string_interpolation.rb
|
240
278
|
- lib/i18n/tasks/unused_keys.rb
|
241
279
|
- lib/i18n/tasks/used_keys.rb
|
242
280
|
- lib/i18n/tasks/version.rb
|
281
|
+
- spec/commands/data_commands_spec.rb
|
282
|
+
- spec/commands/tree_commands_spec.rb
|
243
283
|
- spec/conservative_router_spec.rb
|
244
284
|
- spec/file_system_data_spec.rb
|
245
285
|
- spec/fixtures/app/assets/javascripts/application.js
|
@@ -249,6 +289,7 @@ files:
|
|
249
289
|
- spec/fixtures/app/views/usages.html.slim
|
250
290
|
- spec/fixtures/config/i18n-tasks.yml
|
251
291
|
- spec/google_translate_spec.rb
|
292
|
+
- spec/i18n_spec.rb
|
252
293
|
- spec/i18n_tasks_spec.rb
|
253
294
|
- spec/key_pattern_matching_spec.rb
|
254
295
|
- spec/locale_pathname_spec.rb
|
@@ -294,6 +335,8 @@ signing_key:
|
|
294
335
|
specification_version: 4
|
295
336
|
summary: Manage localization and translation with the awesome power of static analysis
|
296
337
|
test_files:
|
338
|
+
- spec/commands/data_commands_spec.rb
|
339
|
+
- spec/commands/tree_commands_spec.rb
|
297
340
|
- spec/conservative_router_spec.rb
|
298
341
|
- spec/file_system_data_spec.rb
|
299
342
|
- spec/fixtures/app/assets/javascripts/application.js
|
@@ -303,6 +346,7 @@ test_files:
|
|
303
346
|
- spec/fixtures/app/views/usages.html.slim
|
304
347
|
- spec/fixtures/config/i18n-tasks.yml
|
305
348
|
- spec/google_translate_spec.rb
|
349
|
+
- spec/i18n_spec.rb
|
306
350
|
- spec/i18n_tasks_spec.rb
|
307
351
|
- spec/key_pattern_matching_spec.rb
|
308
352
|
- spec/locale_pathname_spec.rb
|