translations_sync 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/translations_sync.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d3e7c0e1c7b07ffe2ca9055ee3c0db22ea7e563
|
4
|
+
data.tar.gz: 1b9046def413e6445f6996981d98fa860baa546c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9763d6a9b0e15ff9ef71ac010e43026e137be081d9c8f5e41652ac1d639e66fc6c47c666e0f2d2c06fa92ac82019a65b302d7830525d10c872787f2ef372f35d
|
7
|
+
data.tar.gz: fd17a84d6ac88e00488c135283dfbe072fd13f10088b3c6bf9d489b60d487daf0e080dfe45367c4a446b6cd76f013b9b38af083c026fc808f17ccdc7274525d6
|
data/lib/translations_sync.rb
CHANGED
@@ -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]+(?:(_
|
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}(?:(_
|
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.
|
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.
|
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
|