globalize-automatic 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/globalize/automatic.rb +3 -1
- data/lib/globalize/automatic/version.rb +1 -1
- 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: 71eb33551bdba0845058a33b51764557c0b89291
|
4
|
+
data.tar.gz: 9862fb16302f5ba2f1fac1cde23fc17e1d745d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6450461d008e368860c2e51c55def714f95151d1bc5956f9e1935f814979f8521ab8f4207ab62f88ba17f2c0ec72aff41be04187c9f1d2f686d82b6bb194637d
|
7
|
+
data.tar.gz: 4a7f159688a01035211d3f88067fa33662af6542a1edc0961f80b2a633110de715166b59e8847f058f20444b6b09a10a39b2a691cba70314f468ff74b1c3b6e6
|
data/lib/globalize/automatic.rb
CHANGED
@@ -109,12 +109,14 @@ module Globalize::Automatic
|
|
109
109
|
|
110
110
|
# 自動翻訳元言語
|
111
111
|
# attr_nameの自動変換が有効なとき
|
112
|
-
#
|
112
|
+
# 現在翻訳元として設定されていてかつ自動変換が無効なものの中で
|
113
|
+
# 一番優先度の高い翻訳元localeを返す。
|
113
114
|
# どの言語も設定されてない場合は一番優先度の高いもの
|
114
115
|
# 自動翻訳元でない場合nil
|
115
116
|
def automatic_translation_locale(attr_name)
|
116
117
|
locales = automatic_translation_field_locales[attr_name]
|
117
118
|
locales.each do |locale|
|
119
|
+
next if send(self.class.automatic_translation_attribute_name_for(attr_name, locale))
|
118
120
|
return locale unless translation_for(locale)[attr_name].blank?
|
119
121
|
end
|
120
122
|
locales.first
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globalize-automatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuichi Takeuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: globalize
|