phrase 0.2.0.beta.4 → 0.2.0.beta.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/phrase/backend/phrase_service.rb +7 -6
- data/lib/phrase/delegate.rb +0 -1
- data/phrase.gemspec +1 -1
- metadata +8 -17
@@ -11,7 +11,7 @@ class Phrase::Backend::PhraseService
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def translate(*args)
|
14
|
-
key = lookup_normalized_key(*args)
|
14
|
+
key = lookup_normalized_key(*args)
|
15
15
|
if Phrase.disabled? or key_is_blacklisted?(key[:key])
|
16
16
|
I18n.translate_without_phrase(*args)
|
17
17
|
else
|
@@ -45,12 +45,13 @@ protected
|
|
45
45
|
|
46
46
|
def lookup_normalized_key(*args)
|
47
47
|
caller = identify_caller
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
duped_args = args.map { |item| item.is_a?(Symbol) ? item : item.dup }
|
49
|
+
|
50
|
+
if caller && duped_args.first =~ /^\./
|
51
|
+
duped_args = transform_args_for_caller(caller, *duped_args)
|
51
52
|
end
|
52
53
|
|
53
|
-
new_args = split_args(*
|
54
|
+
new_args = split_args(*duped_args)
|
54
55
|
|
55
56
|
normalized_key = I18n::Backend::Flatten.normalize_flat_keys(*new_args)
|
56
57
|
normalized_key.gsub!("..", ".")
|
@@ -114,4 +115,4 @@ protected
|
|
114
115
|
template_or_partial.to_s
|
115
116
|
end
|
116
117
|
end
|
117
|
-
end
|
118
|
+
end
|
data/lib/phrase/delegate.rb
CHANGED
data/phrase.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phrase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.beta.
|
4
|
+
version: 0.2.0.beta.5
|
5
5
|
prerelease: 6
|
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: 2012-06-
|
12
|
+
date: 2012-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70210891573660 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.0'
|
24
|
+
version_requirements: *70210891573660
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: addressable
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70210891572900 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ~>
|
@@ -37,12 +32,7 @@ dependencies:
|
|
37
32
|
version: 2.2.8
|
38
33
|
type: :runtime
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 2.2.8
|
35
|
+
version_requirements: *70210891572900
|
46
36
|
description: phrase allows you to edit translations inline, on the page itself. More
|
47
37
|
information at phraseapp.com
|
48
38
|
email:
|
@@ -93,8 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
83
|
version: 1.3.6
|
94
84
|
requirements: []
|
95
85
|
rubyforge_project: phrase
|
96
|
-
rubygems_version: 1.8.
|
86
|
+
rubygems_version: 1.8.17
|
97
87
|
signing_key:
|
98
88
|
specification_version: 3
|
99
89
|
summary: The best way to manage i18n.
|
100
90
|
test_files: []
|
91
|
+
has_rdoc:
|