i18n-hygiene 1.0.0 → 1.0.1
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/lib/i18n/hygiene/key_usage_checker.rb +1 -5
- data/lib/i18n/hygiene/locale_translations.rb +1 -4
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3dcdb7f228de9c43d48acf782db4cf14f236ee4c
|
|
4
|
+
data.tar.gz: c14e85151f6c3bea8a7be5e4da95b7484e1a89c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07c6c613220dc5330f4152985e3d1053a31ef50c81635feda9cc44cf2a5473c4153c51946e8b7bc69c28e5ad9fe414204b4f784c0643613d9233236b51cf8be6
|
|
7
|
+
data.tar.gz: 3eda6eb8a390c413e5bbc110d6705d3f0fd9182ef8ebf6a39cdf0e250ad7b220cc24fa9a52d300be09392b4ad9b131799eaac2627b9f0d5dd1c2c49cc04650b3
|
|
@@ -12,7 +12,7 @@ module I18n
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def used?(key)
|
|
15
|
-
|
|
15
|
+
fully_qualified_key_used?(key)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
private
|
|
@@ -47,10 +47,6 @@ module I18n
|
|
|
47
47
|
}.join(" ")
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
def i18n_config_key?(key)
|
|
51
|
-
key.start_with?("i18n.")
|
|
52
|
-
end
|
|
53
|
-
|
|
54
50
|
def pluralized_key_used?(key)
|
|
55
51
|
[ "zero", "one", "other" ].include?(key.split(".").last)
|
|
56
52
|
end
|
|
@@ -4,9 +4,6 @@ module I18n
|
|
|
4
4
|
# aren't in our control. Can return the i18n keys that **are** in our control,
|
|
5
5
|
# and therefore are interesting for a variety of reasons.
|
|
6
6
|
class LocaleTranslations
|
|
7
|
-
# This is a default example key in the locale files that is not actually used.
|
|
8
|
-
EXAMPLE_KEY = "common.greeting"
|
|
9
|
-
|
|
10
7
|
# These are i18n keys provided by Rails. We cannot exclude them at the :helpers
|
|
11
8
|
# scope level because we do have some TC i18n keys scoped within :helpers.
|
|
12
9
|
|
|
@@ -18,7 +15,7 @@ module I18n
|
|
|
18
15
|
|
|
19
16
|
def keys_to_check
|
|
20
17
|
fully_qualified_keys(translations_to_check).reject { |key|
|
|
21
|
-
exclude_keys.include?(key)
|
|
18
|
+
exclude_keys.include?(key)
|
|
22
19
|
}.sort
|
|
23
20
|
end
|
|
24
21
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: i18n-hygiene
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eleanor Kiefel Haggerty
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2017-07
|
|
13
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: i18n
|
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
159
159
|
version: '0'
|
|
160
160
|
requirements: []
|
|
161
161
|
rubyforge_project:
|
|
162
|
-
rubygems_version: 2.5.
|
|
162
|
+
rubygems_version: 2.5.1
|
|
163
163
|
signing_key:
|
|
164
164
|
specification_version: 4
|
|
165
165
|
summary: A linter for translation data in ruby applications
|