gettext_i18n_rails 0.9.0 → 0.9.1
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/Gemfile.lock +1 -1
- data/gemfiles/rails.2.3.gemfile.lock +1 -1
- data/gemfiles/rails.3.0.gemfile.lock +1 -1
- data/gemfiles/rails.3.1.gemfile.lock +1 -1
- data/gemfiles/rails.3.2.gemfile.lock +1 -1
- data/lib/gettext_i18n_rails/ruby_gettext_extractor.rb +4 -13
- data/lib/gettext_i18n_rails/version.rb +1 -1
- data/spec/gettext_i18n_rails/haml_parser_spec.rb +8 -0
- metadata +12 -12
data/Gemfile.lock
CHANGED
@@ -59,23 +59,14 @@ module RubyGettextExtractor
|
|
59
59
|
elsif node.first == :call
|
60
60
|
type, recv, meth, args = node
|
61
61
|
|
62
|
-
# node has to be in form of "string"+
|
62
|
+
# node has to be in form of "string"+"other_string"
|
63
63
|
return nil unless recv && meth == :+
|
64
64
|
|
65
|
-
# descent recurrsivly to determine the 'receiver' of the string concatination
|
66
|
-
# "foo" + "bar" + baz" is
|
67
|
-
# ("foo".+("bar")).+("baz")
|
68
65
|
first_part = extract_string(recv)
|
66
|
+
second_part = extract_string(args)
|
69
67
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
return nil if second_part.nil?
|
74
|
-
|
75
|
-
return first_part.to_s + second_part.to_s
|
76
|
-
else
|
77
|
-
raise "uuh?"
|
78
|
-
end
|
68
|
+
return nil unless first_part && second_part
|
69
|
+
return first_part.to_s + second_part.to_s
|
79
70
|
else
|
80
71
|
return nil
|
81
72
|
end
|
@@ -23,6 +23,14 @@ describe GettextI18nRails::HamlParser do
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
it "finds messages with concatenation" do
|
27
|
+
with_file '= _("xxxx" + "yyyy" + "zzzz")' do |path|
|
28
|
+
parser.parse(path, []).should == [
|
29
|
+
["xxxxyyyyzzzz", "#{path}:1"]
|
30
|
+
]
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
26
34
|
it "should parse the 1.9 if ruby_version is 1.9" do
|
27
35
|
if RUBY_VERSION =~ /^1\.9/
|
28
36
|
with_file '= _("xxxx", x: 1)' do |path|
|
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext_i18n_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.1
|
4
5
|
prerelease:
|
5
|
-
version: 0.9.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Michael Grosser
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
15
|
+
name: fast_gettext
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 0.4.8
|
20
|
-
|
22
|
+
type: :runtime
|
21
23
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ! '>='
|
26
28
|
- !ruby/object:Gem::Version
|
27
29
|
version: 0.4.8
|
28
|
-
none: false
|
29
|
-
type: :runtime
|
30
30
|
description:
|
31
31
|
email: michael@grosser.it
|
32
32
|
executables: []
|
@@ -94,23 +94,23 @@ rdoc_options: []
|
|
94
94
|
require_paths:
|
95
95
|
- lib
|
96
96
|
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
97
98
|
requirements:
|
98
99
|
- - ! '>='
|
99
100
|
- !ruby/object:Gem::Version
|
100
101
|
version: '0'
|
101
102
|
segments:
|
102
103
|
- 0
|
103
|
-
hash:
|
104
|
-
none: false
|
104
|
+
hash: 3856174768908956080
|
105
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
106
107
|
requirements:
|
107
108
|
- - ! '>='
|
108
109
|
- !ruby/object:Gem::Version
|
109
110
|
version: '0'
|
110
111
|
segments:
|
111
112
|
- 0
|
112
|
-
hash:
|
113
|
-
none: false
|
113
|
+
hash: 3856174768908956080
|
114
114
|
requirements: []
|
115
115
|
rubyforge_project:
|
116
116
|
rubygems_version: 1.8.24
|