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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5c06b9d6d4187eda97fce4acb55c31c8c01534814e8770ed64d3f0f052dbb26
4
- data.tar.gz: ec0198e22e8c9b55fd87f386467cb94400a400263405efc42fc5d3696c610e21
3
+ metadata.gz: 3259a9c8894c28f8372fefdd509e2dc8240d40d8ead58b284fc9887f9c30d2c4
4
+ data.tar.gz: cd9003f49d146342de7466f42478f2bddd94cfcb108752d1a2fb8109900a3abe
5
5
  SHA512:
6
- metadata.gz: 89296743377a8207fa571d82c23c1ec36e71b8209f2f949cf8d541ea0ef4db87b1f69e5c28796ee6ebeeddad1c352a2d1b2f14bf685593e828c715dc74a24b18
7
- data.tar.gz: b66aaea9115ee5015e9696d562666dbcfeae6f770f4e8558e59257557e9d138249639bdf6a9b9e73ee1acadb88b1ae386f0d1dde1e7b655ff816f15e0a229fc9
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.26'
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
- vars = node.value.scan(VARIABLE_REGEX)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module Tasks
5
- VERSION = '0.9.26'
5
+ VERSION = '0.9.27'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.26
4
+ version: 0.9.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebm