translations_sync 0.4.8 → 0.4.9

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog +3 -0
  3. data/lib/translations_sync.rb +5 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba6982180a2cb156ce7ad31ed13358fe208e6fad
4
- data.tar.gz: 303d47cab7eec3dbbf153d7b8cc1a55d3a6fc4de
3
+ metadata.gz: dbb0d0663a40994cbad4f5f7494e154b898babba
4
+ data.tar.gz: d828042f45fe95a33eda19f1c58fd165fc2b354a
5
5
  SHA512:
6
- metadata.gz: 90d7353bcd62190d7895a6deb0c22400100d5c87e0587b020ec3f0fdbf12747c5e8d1cf3cebe7c0bbafe3d5fb7c0877c6d885171fafcaaffbcd88967faff04f4
7
- data.tar.gz: dc0936234b8ff899c9498e4a89e61ee3bd7867d46284f940da260af52d5369bf319a7c8933e529d24a27528f4bb42f4bfbda74cbf9441d32d04f4a5cce71a015
6
+ metadata.gz: 07ae25ca3eb3fe5463aa7b8fecf10a2ab1a21fd7968788c51e2f46afd6c5fa2dfba5af4ffe9bda2b97422e2ce5559682a786ea5d56801b60f15e2b357f3cefbe
7
+ data.tar.gz: 89ab19114a4ba1e743e99eb324e84c94a42ead640dcfeb267e3866d6da5305d9f45e09b724a829995b7bf163c04c528dce9666c64e49e6b4160886ec13515e9a
data/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 2016-09-20 v.0.4.9
2
+ * Regex fixed
3
+
1
4
  2016-06-19 v.0.4.8
2
5
  * Diagnostics is improved
3
6
 
@@ -89,14 +89,14 @@ class TranslationsSync
89
89
  acc
90
90
  end
91
91
 
92
- translations_path_re = Regexp.new "#{translations_dir}(\\/[a-z]{2}(?:-[A-Z]{2})?)?\\/[-_/0-9a-zA-Z]+(?:(_|.)[a-z]{2}(?:-[A-Z]{2})?)?\\.(?:yml|rb)\\Z"
92
+ translations_path_re = Regexp.new "#{translations_dir}(\\/[a-z]{2}(?:-[A-Z]{2})?)?\\/[-_/0-9a-zA-Z]+(?:(_|.)[a-z]{2}(?:-[A-Z]{2})?)\\.(?:yml|rb)\\Z"
93
93
  I18n.load_path.find do |path|
94
94
  path.match translations_path_re
95
95
  end
96
96
  @prefix = $1 or @separator = $2
97
97
 
98
98
  if source
99
- translations_path_re = Regexp.new "#{translations_dir}(\\/[a-z]{2}(?:-[A-Z]{2})?)?\\/#{Regexp.escape source}(?:(_|.)[a-z]{2}(?:-[A-Z]{2})?)?\\.(?:yml|rb)\\Z"
99
+ translations_path_re = Regexp.new "#{translations_dir}(\\/[a-z]{2}(?:-[A-Z]{2})?)?\\/#{Regexp.escape source}(?:(_|.)[a-z]{2}(?:-[A-Z]{2})?)\\.(?:yml|rb)\\Z"
100
100
  I18n.load_path.reject! do |path|
101
101
  path !~ translations_path_re
102
102
  end
@@ -128,8 +128,9 @@ class TranslationsSync
128
128
  size = list.size
129
129
  @locales_with_missing = []
130
130
  flat.each_pair do |key, val|
131
- if val.size < size
132
- (@locales_with_missing += list - val.keys).uniq!
131
+ v = val.reject{|k, v| v.nil?}
132
+ if v.size < size
133
+ (@locales_with_missing += list - v.keys).uniq!
133
134
  break if @locales_with_missing.size == size
134
135
  end
135
136
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: translations_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff