i18n-tasks 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/.travis.yml +1 -4
- data/Gemfile +16 -1
- data/README.md +19 -14
- data/i18n-tasks.gemspec +1 -0
- data/lib/i18n/tasks/google_translation.rb +4 -0
- data/lib/i18n/tasks/ignore_keys.rb +3 -3
- data/lib/i18n/tasks/reports/base.rb +29 -0
- data/lib/i18n/tasks/reports/spreadsheet.rb +54 -0
- data/lib/i18n/tasks/reports/terminal.rb +11 -24
- data/lib/i18n/tasks/version.rb +1 -1
- data/lib/tasks/i18n-tasks.rake +32 -14
- data/spec/i18n_tasks_spec.rb +12 -2
- metadata +93 -130
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 10a6c74d023a1a48cd323220d0040aba024291a9
|
4
|
+
data.tar.gz: 89d8d7f841d16c33b80b8ad53c69b38b17bec801
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9a40284c2b024046cad115c61b9faa22eac5331b380298d9b45b3c83753534fa6c6682114cd6760a1dcd293be8c8e0be4984f95b7462910ec085f3a12a69d074
|
7
|
+
data.tar.gz: bd398e0f3892c70bc27ed94be7a4f6332e396220b2909debb97aecf716280affa5b9d59bd3d356909ef81bf5c0da6bfacc5f086542703614008506e604cafbba
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -3,4 +3,19 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in i18n-tasks.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
|
6
|
+
|
7
|
+
|
8
|
+
platform :rbx do
|
9
|
+
gem "rubysl-rake", "~> 2.0"
|
10
|
+
gem "rubysl-bundler", "~> 2.0"
|
11
|
+
gem "rubysl-digest", "~> 2.0"
|
12
|
+
gem 'rubysl-delegate', '~> 2.0'
|
13
|
+
gem 'rubysl-singleton', '~> 2.0'
|
14
|
+
gem 'rubysl-base64', '~> 2.0'
|
15
|
+
group :development do
|
16
|
+
gem 'racc'
|
17
|
+
gem 'rubysl-irb', '~> 2.0'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
#gem 'byebug'
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# i18n-tasks [![Build Status](https://travis-ci.org/glebm/i18n-tasks.png?branch=master)](https://travis-ci.org/glebm/i18n-tasks) [![Code Climate](https://codeclimate.com/github/glebm/i18n-tasks.png)](https://codeclimate.com/github/glebm/i18n-tasks)
|
2
2
|
|
3
3
|
|
4
|
-
Tasks to manage
|
4
|
+
Tasks to manage translations in Rails.
|
5
5
|
|
6
6
|
![i18n-screenshot](https://raw.github.com/glebm/i18n-tasks/master/doc/img/i18n-tasks.gif "i18n-tasks output screenshot")
|
7
7
|
|
@@ -11,11 +11,15 @@ Use `rake -T i18n` to get the list of tasks with descriptions. These are [the ta
|
|
11
11
|
|
12
12
|
There are reports for missing and unused translations:
|
13
13
|
```bash
|
14
|
-
rake i18n:missing
|
14
|
+
rake i18n:missing
|
15
15
|
rake i18n:unused
|
16
|
+
# or save both to an xlsx file:
|
17
|
+
rake i18n:spreadsheet_report
|
16
18
|
```
|
17
19
|
|
18
|
-
|
20
|
+
i18n-tasks can add missing keys to the locale data, and it can also fill untranslated values.
|
21
|
+
|
22
|
+
To add the keys that are not in the base locale but detected in the source do:
|
19
23
|
```bash
|
20
24
|
# add missing keys to the base locale data (I18n.default_locale)
|
21
25
|
# values set to key.humanize
|
@@ -24,6 +28,11 @@ rake i18n:add_missing
|
|
24
28
|
rake i18n:add_missing[OhNoesMissing]
|
25
29
|
```
|
26
30
|
|
31
|
+
Add blank yaml keys - `key: ''` for all missing and untranslated keys:
|
32
|
+
```bash
|
33
|
+
rake i18n:fill:blanks
|
34
|
+
```
|
35
|
+
|
27
36
|
Prefill empty translations using Google Translate:
|
28
37
|
```bash
|
29
38
|
rake i18n:fill:google_translate
|
@@ -34,10 +43,6 @@ Prefill using values from the base locale - `I8n.default_locale`:
|
|
34
43
|
```bash
|
35
44
|
rake i18n:fill:base_value
|
36
45
|
```
|
37
|
-
Add just blank yaml keys - `key: ''` for all missing and untranslated keys:
|
38
|
-
```bash
|
39
|
-
rake i18n:fill:blanks
|
40
|
-
```
|
41
46
|
|
42
47
|
i18n-tasks sorts the keys and writes them to their respective files:
|
43
48
|
```bash
|
@@ -63,7 +68,7 @@ For more examples see [the tests](/spec/i18n_tasks_spec.rb).
|
|
63
68
|
Simply add to Gemfile:
|
64
69
|
|
65
70
|
```ruby
|
66
|
-
gem 'i18n-tasks', '~> 0.2.
|
71
|
+
gem 'i18n-tasks', '~> 0.2.3'
|
67
72
|
```
|
68
73
|
|
69
74
|
## Configuration
|
@@ -77,18 +82,18 @@ Configuration is read from `config/i18n-tasks.yml`.
|
|
77
82
|
data:
|
78
83
|
# The default YAML adapter supports reading from and writing to YAML files
|
79
84
|
adapter: yaml
|
80
|
-
#
|
85
|
+
# a list of file globs to read from per-locale
|
81
86
|
read:
|
82
87
|
# this one is default:
|
83
88
|
- 'config/locales/%{locale}.yml'
|
84
|
-
# this one
|
89
|
+
# add this one to also read from namespaced files, e.g. simple_form.en.yml:
|
85
90
|
- 'config/locales/*.%{locale}.yml'
|
86
|
-
#
|
91
|
+
# a list of {key pattern => file} routes, matched top to bottom
|
87
92
|
write:
|
88
|
-
# keys
|
93
|
+
# this would save all devise keys in it's own file (per locale):
|
89
94
|
- ['devise.*', 'config/locales/devise.%{locale}.yml']
|
90
|
-
# default catch-all
|
91
|
-
- 'config/locales/%{locale}.yml'
|
95
|
+
# this is the default catch-all:
|
96
|
+
- 'config/locales/%{locale}.yml' # path is short for ['*', path]
|
92
97
|
```
|
93
98
|
|
94
99
|
### Translation
|
data/i18n-tasks.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.add_dependency 'easy_translate'
|
27
27
|
spec.add_dependency 'term-ansicolor'
|
28
28
|
spec.add_dependency 'terminal-table'
|
29
|
+
spec.add_development_dependency 'axlsx', '~> 2.0'
|
29
30
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
30
31
|
spec.add_development_dependency 'rake'
|
31
32
|
spec.add_development_dependency 'rspec-rails'
|
@@ -7,6 +7,10 @@ module I18n::Tasks::GoogleTranslation
|
|
7
7
|
if (key = translation_config[:api_key]).present?
|
8
8
|
opts[:key] ||= key
|
9
9
|
end
|
10
|
+
if opts[:key].blank?
|
11
|
+
$stderr.puts(Term::ANSIColor.red Term::ANSIColor.yellow 'You may need to provide Google API key as GOOGLE_TRANSLATE_API_KEY or in config/i18n-tasks.yml.
|
12
|
+
You can obtain the key at https://code.google.com/apis/console.')
|
13
|
+
end
|
10
14
|
EasyTranslate.translate strings, opts
|
11
15
|
end
|
12
16
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module I18n::Tasks::IgnoreKeys
|
2
2
|
# whether to ignore the key
|
3
3
|
# will also apply global ignore rules
|
4
|
-
# @param [:missing, :
|
4
|
+
# @param [:missing, :unused, :eq_base] ignore_type
|
5
5
|
def ignore_key?(key, ignore_type, locale = nil)
|
6
6
|
key =~ ignore_pattern(ignore_type, locale)
|
7
7
|
end
|
8
8
|
|
9
|
-
# @param type [:missing, :
|
9
|
+
# @param type [:missing, :unused, :eq_base] type
|
10
10
|
# @param locale [String] only when type is :eq_base
|
11
11
|
# @return [Regexp] a regexp that matches all the keys ignored for the type (and locale)
|
12
12
|
def ignore_pattern(type, locale = nil)
|
@@ -22,4 +22,4 @@ module I18n::Tasks::IgnoreKeys
|
|
22
22
|
compile_patterns_re patterns
|
23
23
|
end
|
24
24
|
end
|
25
|
-
end
|
25
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
module I18n::Tasks::Reports
|
3
|
+
class Base
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
@task = I18n::Tasks::BaseTask.new
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_reader :task
|
10
|
+
|
11
|
+
MISSING_TYPES = {
|
12
|
+
none: {glyph: '✗', summary: 'key missing'},
|
13
|
+
blank: {glyph: '∅', summary: 'translation blank'},
|
14
|
+
eq_base: {glyph: '=', summary: 'value same as base value'}
|
15
|
+
}
|
16
|
+
|
17
|
+
def missing_types
|
18
|
+
MISSING_TYPES
|
19
|
+
end
|
20
|
+
|
21
|
+
def missing_title(recs)
|
22
|
+
"Missing translations (#{recs.length})"
|
23
|
+
end
|
24
|
+
|
25
|
+
def unused_title(recs)
|
26
|
+
"Unused keys (#{recs.length})"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'i18n/tasks/reports/base'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
module I18n::Tasks::Reports
|
5
|
+
class Spreadsheet < Base
|
6
|
+
|
7
|
+
def save_report(path = 'tmp/i18n-report.xlsx')
|
8
|
+
p = Axlsx::Package.new
|
9
|
+
add_missing_sheet p.workbook
|
10
|
+
add_unused_sheet p.workbook
|
11
|
+
p.use_shared_strings = true
|
12
|
+
FileUtils.mkpath(File.dirname(path))
|
13
|
+
p.serialize(path)
|
14
|
+
$stderr.puts Term::ANSIColor.green "Saved to #{path}"
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def add_missing_sheet(wb)
|
20
|
+
recs = task.untranslated_keys
|
21
|
+
wb.styles do |s|
|
22
|
+
type_cell = s.add_style :alignment => {:horizontal => :center}
|
23
|
+
locale_cell = s.add_style :alignment => {:horizontal => :center}
|
24
|
+
regular_style = s.add_style
|
25
|
+
wb.add_worksheet(name: missing_title(recs)) { |sheet|
|
26
|
+
sheet.page_setup.fit_to :width => 1
|
27
|
+
sheet.add_row ['Type', 'Locale', 'Key', 'Base Value']
|
28
|
+
style_header sheet
|
29
|
+
recs.each do |rec|
|
30
|
+
sheet.add_row [missing_types[rec[:type]][:summary], rec[:locale], rec[:key], rec[:base_value]],
|
31
|
+
styles: [type_cell, locale_cell, regular_style, regular_style]
|
32
|
+
end
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def add_unused_sheet(wb)
|
38
|
+
recs = task.unused_keys
|
39
|
+
wb.add_worksheet name: unused_title(recs) do |sheet|
|
40
|
+
sheet.add_row ['Key', 'Base Value']
|
41
|
+
style_header sheet
|
42
|
+
recs.each do |rec|
|
43
|
+
sheet.add_row rec
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
def style_header(sheet)
|
50
|
+
border_bottom = sheet.workbook.styles.add_style(border: {style: :thin, color: '000000', edges: [:bottom]})
|
51
|
+
sheet.rows.first.style = border_bottom
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -1,34 +1,23 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
require 'i18n/tasks/reports/base'
|
2
3
|
require 'terminal-table'
|
3
4
|
module I18n
|
4
5
|
module Tasks
|
5
6
|
module Reports
|
6
|
-
class Terminal
|
7
|
+
class Terminal < Base
|
7
8
|
include Term::ANSIColor
|
8
9
|
|
9
|
-
def initialize
|
10
|
-
@task = I18n::Tasks::BaseTask.new
|
11
|
-
end
|
12
|
-
|
13
|
-
attr_reader :task
|
14
|
-
|
15
10
|
def missing_translations
|
16
11
|
recs = task.untranslated_keys
|
17
|
-
print_title
|
12
|
+
print_title missing_title(recs)
|
18
13
|
if recs.present?
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
:eq_base => bold(blue('='))
|
23
|
-
}
|
24
|
-
type_desc = {
|
25
|
-
:none => 'key missing',
|
26
|
-
:blank => 'translation blank',
|
27
|
-
:eq_base => 'value same as base value'
|
28
|
-
}
|
29
|
-
$stderr.puts "#{bold 'Types:'} #{type_desc.keys.map { |k| "#{type_sym[k]} #{type_desc[k]}" } * ', '}"
|
14
|
+
|
15
|
+
$stderr.puts "#{bold 'Types:'} #{missing_types.values.map { |t| "#{t[:glyph]} #{t[:summary]}" } * ', '}"
|
16
|
+
|
30
17
|
print_table headings: [magenta(bold('Locale')), bold('Type'), magenta('i18n Key'), bold(cyan "Base value (#{base_locale})")] do |t|
|
31
18
|
t.rows = recs.map { |rec|
|
19
|
+
glyph = missing_types[rec[:type]][:glyph]
|
20
|
+
glyph = {none: red(glyph), blank: yellow(glyph), eq_base: bold(blue(glyph))}[rec[:type]]
|
32
21
|
if rec[:type] == :none
|
33
22
|
locale = magenta bold rec[:locale]
|
34
23
|
base_value = ''
|
@@ -36,8 +25,8 @@ module I18n
|
|
36
25
|
locale = magenta rec[:locale]
|
37
26
|
base_value = cyan rec[:base_value].try(:strip) || ''
|
38
27
|
end
|
39
|
-
[{:
|
40
|
-
{:
|
28
|
+
[{value: locale, alignment: :center},
|
29
|
+
{value: glyph, alignment: :center},
|
41
30
|
magenta(rec[:key]),
|
42
31
|
base_value]
|
43
32
|
}
|
@@ -49,7 +38,7 @@ module I18n
|
|
49
38
|
|
50
39
|
def unused_translations
|
51
40
|
unused = task.unused_keys
|
52
|
-
print_title
|
41
|
+
print_title unused_title(unused)
|
53
42
|
if unused.present?
|
54
43
|
print_table headings: [bold(magenta('i18n Key')), cyan("Base value (#{base_locale})")] do |t|
|
55
44
|
t.rows = unused.map { |x| [magenta(x[0]), cyan(x[1])] }
|
@@ -61,8 +50,6 @@ module I18n
|
|
61
50
|
|
62
51
|
private
|
63
52
|
|
64
|
-
extend Term::ANSIColor
|
65
|
-
|
66
53
|
def print_title(title)
|
67
54
|
$stderr.puts "#{bold cyan title.strip} #{dark "|"} #{bold "i18n-tasks v#{I18n::Tasks::VERSION}"}"
|
68
55
|
end
|
data/lib/i18n/tasks/version.rb
CHANGED
data/lib/tasks/i18n-tasks.rake
CHANGED
@@ -2,16 +2,30 @@ require 'set'
|
|
2
2
|
require 'i18n/tasks/base_task'
|
3
3
|
require 'i18n/tasks/reports/terminal'
|
4
4
|
require 'active_support/core_ext/module/delegation'
|
5
|
+
require 'i18n/tasks/reports/spreadsheet'
|
5
6
|
|
6
7
|
namespace :i18n do
|
7
8
|
desc 'show missing translations'
|
8
9
|
task :missing => 'i18n:setup' do
|
9
|
-
|
10
|
+
i18n_report.missing_translations
|
10
11
|
end
|
11
12
|
|
12
13
|
desc 'show unused translations'
|
13
14
|
task :unused => 'i18n:setup' do
|
14
|
-
|
15
|
+
i18n_report.unused_translations
|
16
|
+
end
|
17
|
+
|
18
|
+
desc 'save missing and unused translations to an Excel file'
|
19
|
+
task :spreadsheet_report, [:path] => 'i18n:setup' do |t, args|
|
20
|
+
begin
|
21
|
+
require 'axlsx'
|
22
|
+
rescue LoadError
|
23
|
+
message = %Q(To use i18n:spreadsheet_report please add axlsx gem to Gemfile:\ngem 'axlsx', '~> 2.0')
|
24
|
+
STDERR.puts Term::ANSIColor.red Term::ANSIColor.bold message
|
25
|
+
exit 1
|
26
|
+
end
|
27
|
+
args.with_defaults path: 'tmp/i18n-report.xlsx'
|
28
|
+
i18n_spreadsheet_report.save_report(args[:path])
|
15
29
|
end
|
16
30
|
|
17
31
|
desc 'normalize translation data: sort and move to the right files'
|
@@ -19,7 +33,7 @@ namespace :i18n do
|
|
19
33
|
i18n_tasks.normalize_store! args[:locales]
|
20
34
|
end
|
21
35
|
|
22
|
-
desc 'add
|
36
|
+
desc 'add placeholder for missing values to the base locale (default: key.humanize)'
|
23
37
|
task :add_missing, [:placeholder] => 'i18n:setup' do |t, args|
|
24
38
|
i18n_tasks.add_missing! base_locale, args[:placeholder]
|
25
39
|
end
|
@@ -27,19 +41,19 @@ namespace :i18n do
|
|
27
41
|
desc 'fill translations with values'
|
28
42
|
namespace :fill do
|
29
43
|
|
30
|
-
desc 'add
|
44
|
+
desc 'add "" values for missing and untranslated keys to locales (default: all)'
|
31
45
|
task :blanks, [:locales] => 'i18n:setup' do |t, args|
|
32
|
-
i18n_tasks.fill_with_blanks!
|
46
|
+
i18n_tasks.fill_with_blanks! i18n_parse_locales args[:locales]
|
33
47
|
end
|
34
48
|
|
35
|
-
desc 'add
|
49
|
+
desc 'add Google Translated values for untranslated keys to locales (default: all non-base)'
|
36
50
|
task :google_translate, [:locales] => 'i18n:setup' do |t, args|
|
37
|
-
i18n_tasks.fill_with_google_translate!
|
51
|
+
i18n_tasks.fill_with_google_translate! i18n_parse_locales args[:locales]
|
38
52
|
end
|
39
53
|
|
40
|
-
desc '
|
54
|
+
desc 'copy base locale values for all untranslated keys to locales (default: all non-base)'
|
41
55
|
task :base_value, [:locales] => 'i18n:setup' do |t, args|
|
42
|
-
i18n_tasks.fill_with_base_values!
|
56
|
+
i18n_tasks.fill_with_base_values! i18n_parse_locales args[:locales]
|
43
57
|
end
|
44
58
|
end
|
45
59
|
|
@@ -50,7 +64,7 @@ See README.md https://github.com/glebm/i18n-tasks"
|
|
50
64
|
end
|
51
65
|
end
|
52
66
|
|
53
|
-
module I18n::Tasks::RakeHelpers
|
67
|
+
module ::I18n::Tasks::RakeHelpers
|
54
68
|
include Term::ANSIColor
|
55
69
|
|
56
70
|
delegate :base_locale, to: :i18n_tasks
|
@@ -59,14 +73,18 @@ See README.md https://github.com/glebm/i18n-tasks"
|
|
59
73
|
@i18n_tasks ||= I18n::Tasks::BaseTask.new
|
60
74
|
end
|
61
75
|
|
62
|
-
def
|
63
|
-
@
|
76
|
+
def i18n_report
|
77
|
+
@i18n_report ||= I18n::Tasks::Reports::Terminal.new
|
78
|
+
end
|
79
|
+
|
80
|
+
def i18n_spreadsheet_report
|
81
|
+
@i18n_spreadsheet_report ||= I18n::Tasks::Reports::Spreadsheet.new
|
64
82
|
end
|
65
83
|
|
66
|
-
def
|
84
|
+
def i18n_parse_locales(arg = nil)
|
67
85
|
arg.try(:strip).try(:split, /\s*\+\s*/).try(:compact)
|
68
86
|
end
|
69
87
|
end
|
70
|
-
include I18n::Tasks::RakeHelpers
|
88
|
+
include ::I18n::Tasks::RakeHelpers
|
71
89
|
end
|
72
90
|
|
data/spec/i18n_tasks_spec.rb
CHANGED
@@ -10,7 +10,7 @@ describe 'rake i18n' do
|
|
10
10
|
es.missing_in_es.a es.blank_in_es.a es.same_in_es.a
|
11
11
|
en.missing_symbol_key en.missing_symbol.key_two en.missing_symbol.key_three
|
12
12
|
)
|
13
|
-
end
|
13
|
+
end
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ describe 'rake i18n' do
|
|
19
19
|
TestCodebase.capture_stderr do
|
20
20
|
out = TestCodebase.rake_result('i18n:unused')
|
21
21
|
out.should be_i18n_keys %w(unused.a unused.numeric unused.plural)
|
22
|
-
end
|
22
|
+
end
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -33,6 +33,16 @@ describe 'rake i18n' do
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
describe 'spreadsheet report' do
|
37
|
+
it 'saves' do
|
38
|
+
TestCodebase.in_test_app_dir {
|
39
|
+
TestCodebase.rake_result('i18n:spreadsheet_report')
|
40
|
+
File.should exist 'tmp/i18n-report.xlsx'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
36
46
|
describe 'fill:' do
|
37
47
|
it 'add missing' do
|
38
48
|
TestCodebase.in_test_app_dir { YAML.load_file('config/locales/en.yml')['en']['used_but_missing'].should be_nil }
|
metadata
CHANGED
@@ -1,151 +1,113 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n-tasks
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- glebm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2013-11-28 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
14
15
|
name: rake
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
16
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
-
|
25
|
-
-
|
26
|
-
|
27
|
-
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- &id002
|
20
|
+
- ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
34
23
|
type: :runtime
|
24
|
+
version_requirements: *id001
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: activesupport
|
35
27
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
38
|
-
-
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: easy_translate
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
28
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- *id002
|
48
31
|
type: :runtime
|
32
|
+
version_requirements: *id003
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: easy_translate
|
49
35
|
prerelease: false
|
50
|
-
|
51
|
-
requirements:
|
52
|
-
-
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: term-ansicolor
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
36
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- *id002
|
62
39
|
type: :runtime
|
40
|
+
version_requirements: *id004
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: term-ansicolor
|
63
43
|
prerelease: false
|
64
|
-
|
65
|
-
requirements:
|
66
|
-
-
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
44
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- *id002
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id005
|
49
|
+
- !ruby/object:Gem::Dependency
|
70
50
|
name: terminal-table
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
version: '0'
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- *id002
|
76
55
|
type: :runtime
|
56
|
+
version_requirements: *id006
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: axlsx
|
77
59
|
prerelease: false
|
78
|
-
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: bundler
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
60
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
87
62
|
- - ~>
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: "2.0"
|
90
65
|
type: :development
|
66
|
+
version_requirements: *id007
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: bundler
|
91
69
|
prerelease: false
|
92
|
-
|
93
|
-
requirements:
|
70
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
94
72
|
- - ~>
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version:
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: "1.3"
|
104
75
|
type: :development
|
76
|
+
version_requirements: *id008
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
name: rake
|
105
79
|
prerelease: false
|
106
|
-
|
107
|
-
requirements:
|
108
|
-
-
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rspec-rails
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
80
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- *id002
|
118
83
|
type: :development
|
84
|
+
version_requirements: *id009
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: rspec-rails
|
119
87
|
prerelease: false
|
120
|
-
|
121
|
-
requirements:
|
122
|
-
-
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: yard
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
88
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- *id002
|
132
91
|
type: :development
|
92
|
+
version_requirements: *id010
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: yard
|
133
95
|
prerelease: false
|
134
|
-
|
135
|
-
requirements:
|
136
|
-
-
|
137
|
-
|
138
|
-
|
139
|
-
description:
|
140
|
-
|
141
|
-
rake tasks to find unused and missing translations, normalize locale files,
|
142
|
-
and prefill missing keys. Supports relative and plural keys and Google Translate.
|
143
|
-
email:
|
96
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- *id002
|
99
|
+
type: :development
|
100
|
+
version_requirements: *id011
|
101
|
+
description: "\n rake tasks to find unused and missing translations, normalize locale files,\n and prefill missing keys. Supports relative and plural keys and Google Translate.\n"
|
102
|
+
email:
|
144
103
|
- glex.spb@gmail.com
|
145
104
|
executables: []
|
105
|
+
|
146
106
|
extensions: []
|
107
|
+
|
147
108
|
extra_rdoc_files: []
|
148
|
-
|
109
|
+
|
110
|
+
files:
|
149
111
|
- .gitignore
|
150
112
|
- .travis.yml
|
151
113
|
- CHANGES.md
|
@@ -168,6 +130,8 @@ files:
|
|
168
130
|
- lib/i18n/tasks/plural_keys.rb
|
169
131
|
- lib/i18n/tasks/railtie.rb
|
170
132
|
- lib/i18n/tasks/relative_keys.rb
|
133
|
+
- lib/i18n/tasks/reports/base.rb
|
134
|
+
- lib/i18n/tasks/reports/spreadsheet.rb
|
171
135
|
- lib/i18n/tasks/reports/terminal.rb
|
172
136
|
- lib/i18n/tasks/source_keys.rb
|
173
137
|
- lib/i18n/tasks/translation_data.rb
|
@@ -189,30 +153,29 @@ files:
|
|
189
153
|
- spec/support/test_codebase.rb
|
190
154
|
- spec/support/test_codebase_env.rake
|
191
155
|
homepage: https://github.com/glebm/i18n-tasks
|
192
|
-
licenses:
|
156
|
+
licenses:
|
193
157
|
- MIT
|
194
158
|
metadata: {}
|
159
|
+
|
195
160
|
post_install_message:
|
196
161
|
rdoc_options: []
|
197
|
-
|
162
|
+
|
163
|
+
require_paths:
|
198
164
|
- lib
|
199
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
200
|
-
requirements:
|
201
|
-
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
requirements:
|
206
|
-
- - '>='
|
207
|
-
- !ruby/object:Gem::Version
|
208
|
-
version: '0'
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
requirements:
|
167
|
+
- *id002
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- *id002
|
209
171
|
requirements: []
|
172
|
+
|
210
173
|
rubyforge_project:
|
211
174
|
rubygems_version: 2.1.10
|
212
175
|
signing_key:
|
213
176
|
specification_version: 4
|
214
177
|
summary: Tasks to manage missing and unused translations in Rails.
|
215
|
-
test_files:
|
178
|
+
test_files:
|
216
179
|
- spec/fixtures/app/assets/javascripts/application.js
|
217
180
|
- spec/fixtures/app/controllers/events_controller.rb
|
218
181
|
- spec/fixtures/app/views/index.html.slim
|