theoooo-i18n 0.2.1 → 0.2.2
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.
- data/VERSION.yml +1 -1
- data/lib/i18n/backend/active_record/translation.rb +3 -3
- data/lib/i18n/backend/chain.rb +1 -1
- metadata +2 -2
data/VERSION.yml
CHANGED
|
@@ -9,16 +9,16 @@ class Translation < ActiveRecord::Base
|
|
|
9
9
|
serialize :value
|
|
10
10
|
|
|
11
11
|
named_scope :locale, lambda {|locale|
|
|
12
|
-
{ :conditions => {:locale => locale }}
|
|
12
|
+
{ :conditions => {:locale => locale.to_s }}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
named_scope :key, lambda { |key|
|
|
16
|
-
{ :conditions => {:key => key} }
|
|
16
|
+
{ :conditions => {:key => key.to_s} }
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
named_scope :keys, lambda { |key, separator|
|
|
20
20
|
separator ||= I18n.default_separator
|
|
21
|
-
{ :conditions => "key LIKE '#{key}#{separator}%'" }
|
|
21
|
+
{ :conditions => "`key` LIKE '#{key}#{separator}%'" }
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
def value=(v)
|
data/lib/i18n/backend/chain.rb
CHANGED
|
@@ -45,7 +45,7 @@ module I18n
|
|
|
45
45
|
return unless key
|
|
46
46
|
result = {}
|
|
47
47
|
backends.each do |backend|
|
|
48
|
-
entry = backend.lookup
|
|
48
|
+
entry = backend.send( :lookup, locale, key, scope, separator )
|
|
49
49
|
if entry.is_a?(Hash)
|
|
50
50
|
result.merge!(entry)
|
|
51
51
|
elsif !entry.nil?
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: theoooo-i18n
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Fuchs
|
|
@@ -13,7 +13,7 @@ autorequire:
|
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
15
|
|
|
16
|
-
date: 2009-08-
|
|
16
|
+
date: 2009-08-04 00:00:00 -07:00
|
|
17
17
|
default_executable:
|
|
18
18
|
dependencies:
|
|
19
19
|
- !ruby/object:Gem::Dependency
|