l10nizer 0.0.9 → 0.0.10
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/lib/l10nizer/grammar.treetop +2 -2
- data/lib/l10nizer/node.rb +1 -1
- data/lib/l10nizer/version.rb +1 -1
- data/test/test_processor.rb +2 -2
- metadata +52 -24
|
@@ -8,11 +8,11 @@ grammar HtmlErb
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
rule javascript
|
|
11
|
-
"<script" ([^<] / "<"
|
|
11
|
+
"<script" ([^<] / "<" !"/script")* "</script>"
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
rule style
|
|
15
|
-
"<style" ([^<] / "<"
|
|
15
|
+
"<style" ([^<] / "<" !"/style")* "</style>"
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
rule erb_control
|
data/lib/l10nizer/node.rb
CHANGED
data/lib/l10nizer/version.rb
CHANGED
data/test/test_processor.rb
CHANGED
|
@@ -41,7 +41,7 @@ class ProcessorTest < Test::Unit::TestCase
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
should "extract l10n strings" do
|
|
44
|
-
expected = {"string_a_with_b" => "String {
|
|
44
|
+
expected = {"string_a_with_b" => "String %{a} with %{b}"}
|
|
45
45
|
assert_equal expected, @l10nizer.l10ns
|
|
46
46
|
end
|
|
47
47
|
end
|
|
@@ -58,7 +58,7 @@ class ProcessorTest < Test::Unit::TestCase
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
should "extract l10n strings with placeholder variables" do
|
|
61
|
-
expected = {"string_a_with_b" => "String {
|
|
61
|
+
expected = {"string_a_with_b" => "String %{a} with %{b}", "another_a" => "Another %{a}"}
|
|
62
62
|
assert_equal expected, @l10nizer.l10ns
|
|
63
63
|
end
|
|
64
64
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: l10nizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
4
|
+
hash: 11
|
|
5
|
+
prerelease: false
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 0
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.0.10
|
|
5
11
|
platform: ruby
|
|
6
12
|
authors:
|
|
7
13
|
- Paul Battley
|
|
@@ -9,39 +15,55 @@ autorequire:
|
|
|
9
15
|
bindir: bin
|
|
10
16
|
cert_chain: []
|
|
11
17
|
|
|
12
|
-
date:
|
|
13
|
-
default_executable:
|
|
18
|
+
date: 2011-03-02 00:00:00 +00:00
|
|
19
|
+
default_executable: l10nizer
|
|
14
20
|
dependencies:
|
|
15
21
|
- !ruby/object:Gem::Dependency
|
|
16
22
|
name: treetop
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
prerelease: false
|
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
20
26
|
requirements:
|
|
21
27
|
- - ">="
|
|
22
28
|
- !ruby/object:Gem::Version
|
|
29
|
+
hash: 19
|
|
30
|
+
segments:
|
|
31
|
+
- 1
|
|
32
|
+
- 2
|
|
33
|
+
- 6
|
|
23
34
|
version: 1.2.6
|
|
24
|
-
|
|
35
|
+
type: :runtime
|
|
36
|
+
version_requirements: *id001
|
|
25
37
|
- !ruby/object:Gem::Dependency
|
|
26
38
|
name: polyglot
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
prerelease: false
|
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
30
42
|
requirements:
|
|
31
43
|
- - ">="
|
|
32
44
|
- !ruby/object:Gem::Version
|
|
45
|
+
hash: 29
|
|
46
|
+
segments:
|
|
47
|
+
- 0
|
|
48
|
+
- 2
|
|
49
|
+
- 5
|
|
33
50
|
version: 0.2.5
|
|
34
|
-
|
|
51
|
+
type: :runtime
|
|
52
|
+
version_requirements: *id002
|
|
35
53
|
- !ruby/object:Gem::Dependency
|
|
36
54
|
name: thoughtbot-shoulda
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
55
|
+
prerelease: false
|
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
57
|
+
none: false
|
|
40
58
|
requirements:
|
|
41
59
|
- - ">="
|
|
42
60
|
- !ruby/object:Gem::Version
|
|
61
|
+
hash: 3
|
|
62
|
+
segments:
|
|
63
|
+
- 0
|
|
43
64
|
version: "0"
|
|
44
|
-
|
|
65
|
+
type: :development
|
|
66
|
+
version_requirements: *id003
|
|
45
67
|
description:
|
|
46
68
|
email: pbattley@gmail.com
|
|
47
69
|
executables:
|
|
@@ -54,18 +76,18 @@ files:
|
|
|
54
76
|
- Rakefile
|
|
55
77
|
- README.md
|
|
56
78
|
- bin/l10nizer
|
|
57
|
-
- test/samples/output.html.erb
|
|
58
|
-
- test/samples/input.html.erb
|
|
59
79
|
- test/test_key_generator.rb
|
|
60
80
|
- test/test_processor.rb
|
|
81
|
+
- test/samples/input.html.erb
|
|
82
|
+
- test/samples/output.html.erb
|
|
83
|
+
- lib/l10nizer/version.rb
|
|
61
84
|
- lib/l10nizer/grammar.treetop
|
|
62
85
|
- lib/l10nizer/node.rb
|
|
63
|
-
- lib/l10nizer/parser.rb
|
|
64
|
-
- lib/l10nizer/processor.rb
|
|
65
86
|
- lib/l10nizer/keygen.rb
|
|
66
|
-
- lib/l10nizer/
|
|
87
|
+
- lib/l10nizer/processor.rb
|
|
88
|
+
- lib/l10nizer/parser.rb
|
|
67
89
|
- lib/l10nizer.rb
|
|
68
|
-
has_rdoc:
|
|
90
|
+
has_rdoc: false
|
|
69
91
|
homepage:
|
|
70
92
|
licenses: []
|
|
71
93
|
|
|
@@ -75,21 +97,27 @@ rdoc_options: []
|
|
|
75
97
|
require_paths:
|
|
76
98
|
- lib
|
|
77
99
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
|
+
none: false
|
|
78
101
|
requirements:
|
|
79
102
|
- - ">="
|
|
80
103
|
- !ruby/object:Gem::Version
|
|
104
|
+
hash: 3
|
|
105
|
+
segments:
|
|
106
|
+
- 0
|
|
81
107
|
version: "0"
|
|
82
|
-
version:
|
|
83
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
|
+
none: false
|
|
84
110
|
requirements:
|
|
85
111
|
- - ">="
|
|
86
112
|
- !ruby/object:Gem::Version
|
|
113
|
+
hash: 3
|
|
114
|
+
segments:
|
|
115
|
+
- 0
|
|
87
116
|
version: "0"
|
|
88
|
-
version:
|
|
89
117
|
requirements: []
|
|
90
118
|
|
|
91
119
|
rubyforge_project:
|
|
92
|
-
rubygems_version: 1.3.
|
|
120
|
+
rubygems_version: 1.3.7
|
|
93
121
|
signing_key:
|
|
94
122
|
specification_version: 3
|
|
95
123
|
summary: Automatically extract strings from ERB templates and replace with calls to t()
|