i18n_missing_keys 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -1
- data/lib/tasks/i18n_missing_keys.rake +2 -3
- metadata +2 -3
- data/config/ignore_missing_keys.yml +0 -7
data/README.rdoc
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
= i18n_missing_keys
|
2
|
-
|
2
|
+
Usage: rake i18n:missing_keys
|
3
|
+
You can create a config/ignore_missing_keys.yml to specify keys that should not be reported if they are missing. e.g.
|
4
|
+
<code>
|
5
|
+
en:
|
6
|
+
- 'activerecord\.*'
|
7
|
+
- "false"
|
8
|
+
- "true"
|
9
|
+
it:
|
10
|
+
</code>
|
3
11
|
|
4
12
|
== Contributing to i18n_missing_keys
|
5
13
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
namespace :i18n do
|
2
|
-
desc
|
2
|
+
desc 'Find and list translation keys that do not exist in all locales'
|
3
3
|
task :missing_keys => :environment do
|
4
4
|
finder = MissingKeysFinder.new(I18n.backend)
|
5
5
|
finder.find_missing_keys
|
@@ -87,7 +87,6 @@ class MissingKeysFinder
|
|
87
87
|
return full_keys
|
88
88
|
end
|
89
89
|
|
90
|
-
# Returns true if key exists in the given locale
|
91
90
|
def key_exists?(key, locale)
|
92
91
|
I18n.locale = locale
|
93
92
|
I18n.translate(key, :raise => true)
|
@@ -108,7 +107,7 @@ class MissingKeysFinder
|
|
108
107
|
begin
|
109
108
|
@yaml = YAML.load_file(File.join(Rails.root, 'config', 'ignore_missing_keys.yml'))
|
110
109
|
rescue => e
|
111
|
-
STDERR.puts
|
110
|
+
STDERR.puts 'No config/ignore_missing_keys.yml file.'
|
112
111
|
end
|
113
112
|
|
114
113
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_missing_keys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.26
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -116,7 +116,6 @@ extra_rdoc_files:
|
|
116
116
|
- LICENSE.txt
|
117
117
|
- README.rdoc
|
118
118
|
files:
|
119
|
-
- config/ignore_missing_keys.yml
|
120
119
|
- lib/i18n_missing_keys.rb
|
121
120
|
- lib/i18n_missing_keys/railtie.rb
|
122
121
|
- lib/tasks/i18n_missing_keys.rake
|
@@ -137,7 +136,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
136
|
version: '0'
|
138
137
|
segments:
|
139
138
|
- 0
|
140
|
-
hash:
|
139
|
+
hash: -3998639921297256000
|
141
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
141
|
none: false
|
143
142
|
requirements:
|