haml-i18n-extractor 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -13
- data/lib/haml-i18n-extractor.rb +2 -1
- data/lib/haml-i18n-extractor/extraction/extractor.rb +1 -1
- data/lib/haml-i18n-extractor/extraction/text_finder.rb +9 -12
- data/lib/haml-i18n-extractor/extraction/text_replacer.rb +26 -13
- data/lib/haml-i18n-extractor/helpers.rb +37 -0
- data/lib/haml-i18n-extractor/version.rb +1 -1
- data/test/extractor_test.rb +0 -23
- data/test/integration_test.rb +27 -0
- data/test/support/ex3.output.haml +1 -1
- data/test/support/ex4.haml +1 -0
- data/test/support/ex4.output.haml +1 -0
- metadata +201 -182
- checksums.yaml +0 -15
- data/lib/haml-i18n-extractor/flow/helpers.rb +0 -16
data/README.md
CHANGED
@@ -8,7 +8,7 @@ It doesn't translate already translated keys, or things it identfies that are no
|
|
8
8
|
|
9
9
|
## Usage
|
10
10
|
|
11
|
-
You can use the binary which
|
11
|
+
You can use the binary which has an interactive (prompting) and non-interactive mode included in this library. You should be able to use the code directly as a lib too.
|
12
12
|
|
13
13
|
## Examples
|
14
14
|
|
@@ -29,22 +29,13 @@ end
|
|
29
29
|
|
30
30
|
## Demo using interactive mode
|
31
31
|
|
32
|
-
|
32
|
+
The demo is pretty outdated at this point. I would take it off the readme, but heck, I'm lazy. If you want a brief bad version of some of the stuff it does, since that video is pretty old, see it here (your browser needs to support swf):
|
33
33
|
|
34
34
|
[Demo](http://shairosenfeld.com/haml-i18n-extractor-demo.swf)
|
35
35
|
|
36
|
-
The demo will probably be outdated at some point, but the main idea holds. Some of the stuff not in there:
|
37
|
-
|
38
|
-
- A "tag" functionality, which enables you to tag a line you want to review for later, if you are unsure you want to replace it. It will create a list of /file/path:42 tags for you to go and revisit later.
|
39
|
-
- You can use "Next" if you're in the middle of processing a file and go to the next file.
|
40
|
-
- Option parsing.
|
41
|
-
- Other stuff that will come up.
|
42
|
-
|
43
|
-
Have any other ideas? Let me know or better yet, submit a pull request.
|
44
|
-
|
45
36
|
## Example output
|
46
37
|
|
47
|
-
This should be a before and after picture of using this lib, whether using the interactive mode
|
38
|
+
This should be a before and after picture of using this lib, whether using the non-interactive/interactive mode. There are more examples in the tests where you can see more use cases being translated.
|
48
39
|
|
49
40
|
- Before running (old haml):
|
50
41
|
|
@@ -127,7 +118,12 @@ If you want the latest code aka edge, you can also simply clone this repo and in
|
|
127
118
|
## Feedback
|
128
119
|
|
129
120
|
Can use github issues to address any concern you have, or simply email me, with the contact info here: [http://shairosenfeld.com/](http://shairosenfeld.com/).
|
130
|
-
|
121
|
+
|
122
|
+
You can also find me on twitter with the same username as my GH one.
|
123
|
+
|
124
|
+
## Have an idea or an issue?
|
125
|
+
|
126
|
+
Open an [issue](https://github.com/shaiguitar/haml-i18n-extractor/issues/new). Feeling like giving back? Contribute!
|
131
127
|
|
132
128
|
## Contributing
|
133
129
|
|
data/lib/haml-i18n-extractor.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "trollop"
|
2
2
|
|
3
3
|
require "haml-i18n-extractor/version"
|
4
|
+
require "haml-i18n-extractor/helpers"
|
4
5
|
|
5
6
|
require "haml-i18n-extractor/extraction/text_finder"
|
6
7
|
require "haml-i18n-extractor/extraction/exception_finder"
|
@@ -12,7 +13,7 @@ require "haml-i18n-extractor/extraction/haml_writer"
|
|
12
13
|
require "haml-i18n-extractor/extraction/yaml_tool"
|
13
14
|
require "haml-i18n-extractor/extraction/extractor"
|
14
15
|
|
15
|
-
|
16
|
+
|
16
17
|
require "haml-i18n-extractor/flow/prompter"
|
17
18
|
require "haml-i18n-extractor/flow/user_action"
|
18
19
|
require "haml-i18n-extractor/flow/workflow"
|
@@ -5,31 +5,30 @@ module Haml
|
|
5
5
|
class Extractor
|
6
6
|
class TextFinder
|
7
7
|
|
8
|
+
include Helpers::StringHelpers
|
9
|
+
|
10
|
+
# if any of the private handler methods return nil the extractor just outputs orig_line and keeps on going.
|
11
|
+
# if there's an empty string that should do the trick to ( ExceptionFinder can return no match that way )
|
8
12
|
def initialize(orig_line,line_metadata)
|
9
13
|
@orig_line = orig_line
|
10
14
|
@metadata = line_metadata
|
11
15
|
end
|
12
16
|
|
13
|
-
# returns [ line_type, text_found ]
|
14
17
|
def process_by_regex
|
18
|
+
# [ line_type, text_found ]
|
15
19
|
if Haml::I18n::Extractor.debug?
|
16
|
-
binding.pry
|
17
|
-
puts '!!!'
|
18
20
|
puts @metadata && @metadata[:type]
|
21
|
+
puts @metadata.inspect
|
19
22
|
puts @orig_line
|
20
23
|
end
|
21
|
-
# if any of the handler methods return nil the extractor just outputs orig_line and keeps on going.
|
22
|
-
# if there's an empty string that should do the trick to ( ExceptionFinder can return no match that way )
|
23
24
|
@metadata && send("#{@metadata[:type]}", @metadata)
|
24
25
|
end
|
25
26
|
|
26
27
|
private
|
27
28
|
|
28
|
-
#FIXME move all these matches into a helper of some sort.
|
29
|
-
|
30
29
|
def plain(line)
|
31
30
|
txt = line[:value][:text]
|
32
|
-
return nil if
|
31
|
+
return nil if html_comment?(txt)
|
33
32
|
[:plain, txt]
|
34
33
|
end
|
35
34
|
|
@@ -37,7 +36,7 @@ module Haml
|
|
37
36
|
txt = line[:value][:value]
|
38
37
|
if txt
|
39
38
|
has_script_in_tag = line[:value][:parse] # %element= foo
|
40
|
-
has_exception =
|
39
|
+
has_exception = link_to?(txt)
|
41
40
|
if has_script_in_tag && !has_exception
|
42
41
|
[:tag, ""]
|
43
42
|
else
|
@@ -50,9 +49,7 @@ module Haml
|
|
50
49
|
|
51
50
|
def script(line)
|
52
51
|
txt = line[:value][:text]
|
53
|
-
|
54
|
-
scanner.scan(/\s+/)
|
55
|
-
if scanner.scan(/['"]/) || scanner.scan(/link_to/)
|
52
|
+
if could_match_script?(txt)
|
56
53
|
[:script, ExceptionFinder.new(txt).find]
|
57
54
|
else
|
58
55
|
[:script, ""]
|
@@ -23,7 +23,8 @@ module Haml
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def replace_hash
|
26
|
-
|
26
|
+
t_name = keyname(@text_to_replace, @orig_line)
|
27
|
+
@replace_hash ||= { :modified_line => modified_line, :keyname => t_name, :replaced_text => @text_to_replace }
|
27
28
|
end
|
28
29
|
|
29
30
|
# the new full line, including a `t()` replacement instead of the `text_to_replace` portion.
|
@@ -37,24 +38,35 @@ module Haml
|
|
37
38
|
|
38
39
|
private
|
39
40
|
|
40
|
-
def keyname
|
41
|
-
text_to_replace =
|
41
|
+
def keyname(to_replace, orig_line)
|
42
|
+
text_to_replace = to_replace.dup
|
42
43
|
if has_been_translated?(text_to_replace)
|
43
44
|
text_to_replace
|
44
45
|
else
|
45
|
-
name =
|
46
|
-
name =
|
47
|
-
|
46
|
+
name = normalize_name(text_to_replace)
|
47
|
+
name = normalize_name(orig_line.dup) if name.empty?
|
48
|
+
with_translate_method(name)
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
52
|
+
def with_translate_method(name)
|
53
|
+
"t('.#{name}')"
|
54
|
+
end
|
55
|
+
|
51
56
|
# adds the = to the right place in the string ... = t() stuff.
|
52
57
|
def apply_ruby_evaling(str)
|
53
58
|
if LINE_TYPES_ADD_EVAL.include?(@line_type)
|
54
59
|
if @line_type == :tag
|
55
|
-
str.match /^([^\s\t]*)(.*)$/
|
56
|
-
|
57
|
-
|
60
|
+
#str.match /^([^\s\t]*)(.*)$/
|
61
|
+
t_name = keyname(@text_to_replace, @orig_line)
|
62
|
+
match_keyname = Regexp.new('[\s\t]*' + Regexp.escape(t_name))
|
63
|
+
str.match(/(.*?)(#{match_keyname})/)
|
64
|
+
elem = $1
|
65
|
+
#binding.pry if str.match /color/
|
66
|
+
#str.gsub!(keyname, "= #{keyname.strip}")
|
67
|
+
if elem
|
68
|
+
str.gsub!(Regexp.new(Regexp.escape(elem)), "#{elem}=") unless already_evaled?(elem)
|
69
|
+
end
|
58
70
|
elsif @line_type == :plain
|
59
71
|
str.gsub!(str, "= "+str)
|
60
72
|
end
|
@@ -73,14 +85,15 @@ module Haml
|
|
73
85
|
|
74
86
|
def remove_surrounding_quotes(str)
|
75
87
|
# if there are quotes surrounding the string, we want them removed as well...
|
76
|
-
|
77
|
-
|
78
|
-
|
88
|
+
t_name = keyname(@text_to_replace, @orig_line)
|
89
|
+
unless str.gsub!('"' + @text_to_replace + '"', t_name )
|
90
|
+
unless str.gsub!("'" + @text_to_replace + "'", t_name)
|
91
|
+
str.gsub!(@text_to_replace, t_name)
|
79
92
|
end
|
80
93
|
end
|
81
94
|
end
|
82
95
|
|
83
|
-
def
|
96
|
+
def normalize_name(str)
|
84
97
|
NOT_ALLOWED_IN_KEYNAME.each{ |rm_me| str.gsub!(rm_me, "") }
|
85
98
|
str = str.gsub(/\s+/, " ").strip
|
86
99
|
str.downcase.tr(' ', '_')[0..LIMIT_KEY_NAME-1]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module Haml
|
2
|
+
module I18n
|
3
|
+
class Extractor
|
4
|
+
module Helpers
|
5
|
+
|
6
|
+
module StringHelpers
|
7
|
+
def html_comment?(txt)
|
8
|
+
txt.match(/<!--/) || txt.match(/-->\s*$/)
|
9
|
+
end
|
10
|
+
def link_to?(txt)
|
11
|
+
txt.match(/link_to/) || txt.match(/^\s*['"]/) # %element= 'foo'
|
12
|
+
end
|
13
|
+
|
14
|
+
def could_match_script?(txt)
|
15
|
+
# want to match:
|
16
|
+
# = 'foo'
|
17
|
+
# = "foo"
|
18
|
+
# = link_to 'bla'
|
19
|
+
#
|
20
|
+
# but not match:
|
21
|
+
# = ruby_var = 2
|
22
|
+
scanner = StringScanner.new(txt)
|
23
|
+
scanner.scan(/\s+/)
|
24
|
+
scanner.scan(/['"]/) || scanner.scan(/link_to/)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Highline
|
29
|
+
def highlight(str, color = :yellow)
|
30
|
+
"<%= color('#{str.to_s}', :black, :on_#{color}) %>"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
data/test/extractor_test.rb
CHANGED
@@ -97,29 +97,6 @@ module Haml
|
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
|
-
# really integration tests...movez.
|
101
|
-
test "it can replace a string body and have expected output ex4" do
|
102
|
-
expected_output = File.read(file_path("ex4.output.haml"))
|
103
|
-
assert_equal Haml::I18n::Extractor.new(file_path("ex4.haml")).new_body, expected_output
|
104
|
-
end
|
105
|
-
|
106
|
-
test "it can replace a string body and have expected output ex3" do
|
107
|
-
expected_output = File.read(file_path("ex3.output.haml"))
|
108
|
-
assert_equal Haml::I18n::Extractor.new(file_path("ex3.haml")).new_body, expected_output
|
109
|
-
end
|
110
|
-
|
111
|
-
test "it can replace a string body and have expected output ex2" do
|
112
|
-
expected_output = File.read(file_path("ex2.output.haml"))
|
113
|
-
assert_equal Haml::I18n::Extractor.new(file_path("ex2.haml")).new_body, expected_output
|
114
|
-
end
|
115
|
-
|
116
|
-
|
117
|
-
test "it can replace a string body and have expected output ex1" do
|
118
|
-
expected_output = File.read(file_path("ex1.output.haml"))
|
119
|
-
assert_equal @ex1.new_body, expected_output
|
120
|
-
end
|
121
|
-
|
122
|
-
|
123
100
|
test "it writes the haml to an out file if valid haml output" do
|
124
101
|
FileUtils.rm_rf(@ex1.haml_writer.path)
|
125
102
|
assert_equal File.exists?(@ex1.haml_writer.path), false
|
data/test/integration_test.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
1
3
|
module Haml
|
2
4
|
class IntegrationTest < MiniTest::Unit::TestCase
|
3
5
|
|
@@ -20,5 +22,30 @@ module Haml
|
|
20
22
|
assert partial_extractor.yaml_tool.yaml_hash["en"]["view2"]["partial"], "partial filenames in yaml are w/out leading _"
|
21
23
|
end
|
22
24
|
|
25
|
+
## EXAMPLES
|
26
|
+
|
27
|
+
test "it can replace a string body and have expected output ex4" do
|
28
|
+
expected_output = File.read(file_path("ex4.output.haml"))
|
29
|
+
assert_equal Haml::I18n::Extractor.new(file_path("ex4.haml")).new_body, expected_output
|
30
|
+
end
|
31
|
+
|
32
|
+
test "it can replace a string body and have expected output ex3" do
|
33
|
+
expected_output = File.read(file_path("ex3.output.haml"))
|
34
|
+
assert_equal Haml::I18n::Extractor.new(file_path("ex3.haml")).new_body, expected_output
|
35
|
+
end
|
36
|
+
|
37
|
+
test "it can replace a string body and have expected output ex2" do
|
38
|
+
expected_output = File.read(file_path("ex2.output.haml"))
|
39
|
+
assert_equal Haml::I18n::Extractor.new(file_path("ex2.haml")).new_body, expected_output
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
test "it can replace a string body and have expected output ex1" do
|
44
|
+
expected_output = File.read(file_path("ex1.output.haml"))
|
45
|
+
assert_equal Haml::I18n::Extractor.new(file_path("ex1.haml")).new_body, expected_output
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
23
50
|
end
|
24
51
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
= link_to t('.real_text_here'), id: 'customer-control-menu', role: 'button', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
|
5
5
|
= t('.there')
|
6
6
|
|
7
|
-
%span.creator{:title
|
7
|
+
%span.creator{:title => "This user is an= t('.owner') of this account"} t('.owner')
|
8
8
|
%span.title&= user.name
|
9
9
|
%strong \#{@account.name}
|
10
10
|
|
data/test/support/ex4.haml
CHANGED
metadata
CHANGED
@@ -1,205 +1,216 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-i18n-extractor
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 4
|
9
|
+
- 3
|
10
|
+
version: 0.4.3
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Shai Rosenfeld
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-09-05 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
14
21
|
name: tilt
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ! '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
22
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- - ! '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
34
32
|
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: haml
|
35
36
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- - ! '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
48
46
|
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: activesupport
|
49
50
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
62
60
|
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: highline
|
63
64
|
prerelease: false
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
- - '='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.16.2
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
76
74
|
type: :runtime
|
75
|
+
version_requirements: *id004
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: trollop
|
77
78
|
prerelease: false
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - "="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 83
|
85
|
+
segments:
|
86
|
+
- 1
|
87
|
+
- 16
|
88
|
+
- 2
|
82
89
|
version: 1.16.2
|
83
|
-
|
90
|
+
type: :runtime
|
91
|
+
version_requirements: *id005
|
92
|
+
- !ruby/object:Gem::Dependency
|
84
93
|
name: rbench
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ! '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
94
|
prerelease: false
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
- - ! '>='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
95
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
104
|
type: :development
|
105
|
+
version_requirements: *id006
|
106
|
+
- !ruby/object:Gem::Dependency
|
107
|
+
name: m
|
105
108
|
prerelease: false
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
- - ! '>='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
109
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
hash: 3
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
version: "0"
|
118
118
|
type: :development
|
119
|
+
version_requirements: *id007
|
120
|
+
- !ruby/object:Gem::Dependency
|
121
|
+
name: pry
|
119
122
|
prerelease: false
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
- - ! '>='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
123
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
132
132
|
type: :development
|
133
|
+
version_requirements: *id008
|
134
|
+
- !ruby/object:Gem::Dependency
|
135
|
+
name: minitest
|
133
136
|
prerelease: false
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
- - ! '>='
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
137
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
hash: 3
|
143
|
+
segments:
|
144
|
+
- 0
|
145
|
+
version: "0"
|
146
146
|
type: :development
|
147
|
+
version_requirements: *id009
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: nokogiri
|
147
150
|
prerelease: false
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
- - ! '>='
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
151
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
152
|
+
none: false
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
hash: 3
|
157
|
+
segments:
|
158
|
+
- 0
|
159
|
+
version: "0"
|
160
160
|
type: :development
|
161
|
+
version_requirements: *id010
|
162
|
+
- !ruby/object:Gem::Dependency
|
163
|
+
name: rake
|
161
164
|
prerelease: false
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
- - ! '>='
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
165
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
hash: 3
|
171
|
+
segments:
|
172
|
+
- 0
|
173
|
+
version: "0"
|
174
174
|
type: :development
|
175
|
+
version_requirements: *id011
|
176
|
+
- !ruby/object:Gem::Dependency
|
177
|
+
name: actionpack
|
175
178
|
prerelease: false
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
- - ! '>='
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
179
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
180
|
+
none: false
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
hash: 3
|
185
|
+
segments:
|
186
|
+
- 0
|
187
|
+
version: "0"
|
188
188
|
type: :development
|
189
|
+
version_requirements: *id012
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: rails
|
189
192
|
prerelease: false
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
193
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
195
|
+
requirements:
|
196
|
+
- - ">="
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
hash: 3
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
version: "0"
|
202
|
+
type: :development
|
203
|
+
version_requirements: *id013
|
195
204
|
description: Parse the texts out of the haml files into localization files
|
196
|
-
email:
|
205
|
+
email:
|
197
206
|
- shaiguitar@gmail.com
|
198
|
-
executables:
|
207
|
+
executables:
|
199
208
|
- haml-i18n-extractor
|
200
209
|
extensions: []
|
210
|
+
|
201
211
|
extra_rdoc_files: []
|
202
|
-
|
212
|
+
|
213
|
+
files:
|
203
214
|
- .gitignore
|
204
215
|
- .rvmrc
|
205
216
|
- Gemfile
|
@@ -222,10 +233,10 @@ files:
|
|
222
233
|
- lib/haml-i18n-extractor/extraction/text_replacer.rb
|
223
234
|
- lib/haml-i18n-extractor/extraction/yaml_tool.rb
|
224
235
|
- lib/haml-i18n-extractor/flow/cli.rb
|
225
|
-
- lib/haml-i18n-extractor/flow/helpers.rb
|
226
236
|
- lib/haml-i18n-extractor/flow/prompter.rb
|
227
237
|
- lib/haml-i18n-extractor/flow/user_action.rb
|
228
238
|
- lib/haml-i18n-extractor/flow/workflow.rb
|
239
|
+
- lib/haml-i18n-extractor/helpers.rb
|
229
240
|
- lib/haml-i18n-extractor/version.rb
|
230
241
|
- test/cli_test.rb
|
231
242
|
- test/exception_finder_test.rb
|
@@ -253,30 +264,39 @@ files:
|
|
253
264
|
- test/workflow_test.rb
|
254
265
|
- test/yaml_tool_test.rb
|
255
266
|
homepage: https://github.com/shaiguitar/haml-i18n-extractor
|
256
|
-
licenses:
|
267
|
+
licenses:
|
257
268
|
- MIT
|
258
|
-
metadata: {}
|
259
269
|
post_install_message:
|
260
270
|
rdoc_options: []
|
261
|
-
|
271
|
+
|
272
|
+
require_paths:
|
262
273
|
- lib
|
263
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
274
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
275
|
+
none: false
|
276
|
+
requirements:
|
277
|
+
- - ">="
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
hash: 3
|
280
|
+
segments:
|
281
|
+
- 0
|
282
|
+
version: "0"
|
283
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
284
|
+
none: false
|
285
|
+
requirements:
|
286
|
+
- - ">="
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
hash: 3
|
289
|
+
segments:
|
290
|
+
- 0
|
291
|
+
version: "0"
|
273
292
|
requirements: []
|
293
|
+
|
274
294
|
rubyforge_project:
|
275
|
-
rubygems_version:
|
295
|
+
rubygems_version: 1.8.25
|
276
296
|
signing_key:
|
277
|
-
specification_version:
|
297
|
+
specification_version: 3
|
278
298
|
summary: Parse the texts out of the haml files into localization files
|
279
|
-
test_files:
|
299
|
+
test_files:
|
280
300
|
- test/cli_test.rb
|
281
301
|
- test/exception_finder_test.rb
|
282
302
|
- test/extractor_test.rb
|
@@ -302,4 +322,3 @@ test_files:
|
|
302
322
|
- test/text_replacer_test.rb
|
303
323
|
- test/workflow_test.rb
|
304
324
|
- test/yaml_tool_test.rb
|
305
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
MjljMTFjNmFiZDk2YWY2MjVlMWFmMjQwNDQ1MDc3OTdhYWRhNDlkZA==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NjlhYjM5YWFlOWY5NzNmM2E0ZjZjZGMwYWU5MDVlMWQ4YjU1MjYwNg==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MDEzZDk1ODEzYzI1MjM4OTMwM2MwNWYzMTYzN2RjZDA2NjY5NmYwMGRmYjk5
|
10
|
-
Yzc4MjViYjEyNThmYzJkOTNlZThlMDRmOTZmNmFiNjllNzM1NGQ4MWE2YmFj
|
11
|
-
MjNlNjlmZDE4N2JiYTlmYTk2YTM4NDIwZDBmYmJmMzJkYmQwYjU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ODMzNmU2NThmOTMxNDFhMTgwN2M4NzNhZGI4MmYyN2RiMmQ3NTEzMzNlM2Nk
|
14
|
-
NGEzYmQ0ZjVjMTJmYmQ1OWNiZDUwNWMzMmIxOWMzYzM2ZGU1YTQ3ZjdlZTZl
|
15
|
-
ZGU5MmUxZmIxYjU3YTQwOWNjZjQ3NzdmMDFlMmNlMzllMWY1Yzg=
|