i18n-tasks 0.9.26 → 0.9.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/i18n/tasks/interpolations.rb +1 -2
- data/lib/i18n/tasks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3259a9c8894c28f8372fefdd509e2dc8240d40d8ead58b284fc9887f9c30d2c4
|
4
|
+
data.tar.gz: cd9003f49d146342de7466f42478f2bddd94cfcb108752d1a2fb8109900a3abe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a05cf473e34cc265fd70ad193aa849698dafca63b6d76542170d6d119b9d4c453ae06cd1b23d2c9ce3b6943e0d3e14865bb62ffe4cc3c2ab591e432530a2a28
|
7
|
+
data.tar.gz: 6d9fe81237a10d0fec00ab1bb588d45beb3085ef8342dd644bcc059547b079971aad039d1f17203d16439eece482ca83904f29fdf6e99d6cabe7481667b336a9
|
data/README.md
CHANGED
@@ -22,7 +22,7 @@ i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (def
|
|
22
22
|
Add i18n-tasks to the Gemfile:
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem 'i18n-tasks', '~> 0.9.
|
25
|
+
gem 'i18n-tasks', '~> 0.9.27'
|
26
26
|
```
|
27
27
|
|
28
28
|
Copy the default [configuration file](#configuration):
|
@@ -50,6 +50,7 @@ Run `i18n-tasks` to get the list of all the tasks with short descriptions.
|
|
50
50
|
### Check health
|
51
51
|
|
52
52
|
`i18n-tasks health` checks if any keys are missing or not used,
|
53
|
+
that interpolations variables are consistent across locales,
|
53
54
|
and that all the locale files are normalized (auto-formatted):
|
54
55
|
|
55
56
|
```console
|
@@ -15,8 +15,7 @@ module I18n::Tasks
|
|
15
15
|
(locales - [base_locale]).each do |current_locale|
|
16
16
|
node = data[current_locale].first.children[key]
|
17
17
|
next unless node&.value&.is_a?(String)
|
18
|
-
|
19
|
-
unless vars.size == base_vars.size && vars.all? { |v| base_vars.include?(v) }
|
18
|
+
if base_vars != Set.new(node.value.scan(VARIABLE_REGEX))
|
20
19
|
result.merge!(node.walk_to_root.reduce(nil) { |c, p| [p.derive(children: c)] })
|
21
20
|
end
|
22
21
|
end
|
data/lib/i18n/tasks/version.rb
CHANGED