i81n 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/i81n.gemspec +2 -2
- data/lib/i81n.rb +12 -1
- metadata +11 -11
data/README.md
CHANGED
@@ -19,7 +19,7 @@ Rails をお使いの際は Gemfile に以下を追記して bundle install を
|
|
19
19
|
|
20
20
|
I18n.backend を以下のように設定してください(Rails では config/initializers/i81n.rb 等に書いておくとよいでしょう)。
|
21
21
|
|
22
|
-
I18n.backend = I18n::Backend::I81n.new
|
22
|
+
I18n.backend = I18n::Backend::I81n.new(/^(helpers\.label|activerecord\.attributes)/)
|
23
23
|
|
24
24
|
使い方
|
25
25
|
----
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/i81n.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "i81n"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["jugyo"]
|
12
|
-
s.date = "2011-11-
|
12
|
+
s.date = "2011-11-17"
|
13
13
|
s.description = "I81n aims that make I18n easy to use."
|
14
14
|
s.email = "jugyo.org@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/i81n.rb
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
require 'i18n'
|
2
2
|
class I18n::Backend::I81n < I18n::Backend::Simple
|
3
|
+
attr_reader :ignore_pattern
|
4
|
+
|
5
|
+
def initialize(ignore_pattern = nil)
|
6
|
+
@ignore_pattern = ignore_pattern
|
7
|
+
super
|
8
|
+
end
|
9
|
+
|
3
10
|
def lookup(locale, key, scope = [], options = {})
|
4
|
-
|
11
|
+
if ignore_pattern && ignore_pattern =~ key.to_s
|
12
|
+
super
|
13
|
+
else
|
14
|
+
super || key.to_s
|
15
|
+
end
|
5
16
|
end
|
6
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i81n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-11-
|
12
|
+
date: 2011-11-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
16
|
-
requirement: &
|
16
|
+
requirement: &2160161520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2160161520
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: shoulda
|
27
|
-
requirement: &
|
27
|
+
requirement: &2160160400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2160160400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &2160159120 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2160159120
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &2160157800 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.5.2
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2160157800
|
58
58
|
description: I81n aims that make I18n easy to use.
|
59
59
|
email: jugyo.org@gmail.com
|
60
60
|
executables: []
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
segments:
|
92
92
|
- 0
|
93
|
-
hash: -
|
93
|
+
hash: -4339420276035753115
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|