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.
@@ -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
- if caller && args.first =~ /^\./
50
- args = transform_args_for_caller(caller, *args)
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(*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
@@ -19,7 +19,6 @@ class Phrase::Delegate
19
19
  end
20
20
 
21
21
  def method_missing(*args, &block)
22
- puts args.first
23
22
  if @key.respond_to?(args.first)
24
23
  to_s.send(*args)
25
24
  else
data/phrase.gemspec CHANGED
@@ -4,7 +4,7 @@ $:.unshift lib unless $:.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "phrase"
7
- s.version = "0.2.0.beta.4"
7
+ s.version = "0.2.0.beta.5"
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Dynport GmbH"]
10
10
  s.email = ["info@phraseapp.com"]
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
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-25 00:00:00.000000000 Z
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: !ruby/object:Gem::Requirement
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: !ruby/object:Gem::Requirement
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.24
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: