phene-i18n_auto_scoping 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/i18n_auto_scoping.rb +1 -2
- data/spec/locales/en.yml +7 -6
- metadata +4 -4
data/lib/i18n_auto_scoping.rb
CHANGED
@@ -93,13 +93,12 @@ module I18n
|
|
93
93
|
return nil unless latest_app_file
|
94
94
|
|
95
95
|
scope = latest_app_file.match(/([^:]+):\d+.*/)[1]
|
96
|
-
path = scope.split('/app/
|
96
|
+
path = scope.split('/app/').last
|
97
97
|
scope = File.basename(path).split('.').shift
|
98
98
|
# If there is a second extension we keep it, in order to work with .erb.html or .erb.iphone, etc...
|
99
99
|
scope = "#{File.dirname(path)}/#{scope}" if File.dirname(path) != '.'
|
100
100
|
|
101
101
|
scope.gsub!('/', '.')
|
102
|
-
|
103
102
|
scope.to_sym
|
104
103
|
end
|
105
104
|
|
data/spec/locales/en.yml
CHANGED
@@ -4,10 +4,11 @@
|
|
4
4
|
:hi: 'Hello in Test Scope'
|
5
5
|
:bam:
|
6
6
|
:hi: 'Hello in Bam'
|
7
|
-
:
|
8
|
-
:
|
9
|
-
|
10
|
-
:hi: 'Hello in partial'
|
11
|
-
:folder:
|
7
|
+
:views:
|
8
|
+
:view:
|
9
|
+
:hi: 'Hello in view'
|
12
10
|
:_partial:
|
13
|
-
:hi: 'Hello in
|
11
|
+
:hi: 'Hello in partial'
|
12
|
+
:folder:
|
13
|
+
:_partial:
|
14
|
+
:hi: 'Hello in nested partial'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phene-i18n_auto_scoping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 7
|
10
|
+
version: 0.2.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Geoffrey Hichborn
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-05 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|