translations_sync 0.4.9 → 0.4.10

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/translations_sync.rb +4 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbb0d0663a40994cbad4f5f7494e154b898babba
4
- data.tar.gz: d828042f45fe95a33eda19f1c58fd165fc2b354a
3
+ metadata.gz: 1d3e7c0e1c7b07ffe2ca9055ee3c0db22ea7e563
4
+ data.tar.gz: 1b9046def413e6445f6996981d98fa860baa546c
5
5
  SHA512:
6
- metadata.gz: 07ae25ca3eb3fe5463aa7b8fecf10a2ab1a21fd7968788c51e2f46afd6c5fa2dfba5af4ffe9bda2b97422e2ce5559682a786ea5d56801b60f15e2b357f3cefbe
7
- data.tar.gz: 89ab19114a4ba1e743e99eb324e84c94a42ead640dcfeb267e3866d6da5305d9f45e09b724a829995b7bf163c04c528dce9666c64e49e6b4160886ec13515e9a
6
+ metadata.gz: 9763d6a9b0e15ff9ef71ac010e43026e137be081d9c8f5e41652ac1d639e66fc6c47c666e0f2d2c06fa92ac82019a65b302d7830525d10c872787f2ef372f35d
7
+ data.tar.gz: fd17a84d6ac88e00488c135283dfbe072fd13f10088b3c6bf9d489b60d487daf0e080dfe45367c4a446b6cd76f013b9b38af083c026fc808f17ccdc7274525d6
@@ -89,22 +89,24 @@ 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
103
103
  end
104
104
 
105
+ puts ignore.inspect
105
106
  if ignore
106
107
  translations_path_re = Regexp.new "#{translations_dir}#{'\\/[^/]+' if @prefix}\\/#{Regexp.escape ignore}"
107
108
  I18n.load_path.reject! do |path|
109
+ puts "#{path} #{(path !~ translations_path_re).inspect}"
108
110
  path =~ translations_path_re
109
111
  end
110
112
  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.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.5.1
78
+ rubygems_version: 2.6.11
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Synchronizes the different locales translations represeinted in yaml for