i18n_checker 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/i18n_checker/locale/collector/haml.rb +8 -4
- data/lib/i18n_checker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd31944e28c141c0196975d4cbb8a2e171834b53
|
4
|
+
data.tar.gz: 129949bfbb57a8dcb97b290bc8d32e99d5212d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ce662d65bce4aa03f5b23ecdfd49e4147b0f77e88240fd0f0d961b28c86cb0053426fce6451ad7fc269aafa4c2ba70d60fbbe9b48e462995fc0d87137bbb097
|
7
|
+
data.tar.gz: 7a517f18886fb8c23e35dcd0fbe8d78671448aaf2203779395ec40df9252da628ffc4e57a71e9ff371d9ed9d18504881434a236376319509f310a326316d8053
|
data/Gemfile.lock
CHANGED
@@ -39,11 +39,11 @@ module I18nChecker
|
|
39
39
|
|
40
40
|
def collect_locale_text(ast)
|
41
41
|
return locale_text_from_text(ast) if ast.is_a?(HamlParser::Ast::Text)
|
42
|
-
return locale_text_from_script(ast) if
|
42
|
+
return locale_text_from_script(ast) if script_node?(ast)
|
43
43
|
return unless ast.respond_to?(:oneline_child)
|
44
44
|
if ast.oneline_child.is_a?(HamlParser::Ast::Text)
|
45
45
|
locale_text_from_text(ast.oneline_child)
|
46
|
-
elsif ast.oneline_child
|
46
|
+
elsif script_node?(ast.oneline_child)
|
47
47
|
locale_text_from_script(ast.oneline_child)
|
48
48
|
end
|
49
49
|
end
|
@@ -88,7 +88,7 @@ module I18nChecker
|
|
88
88
|
|
89
89
|
node_lines = if ast_node.is_a?(HamlParser::Ast::Text)
|
90
90
|
ast_node.text.split("\n")
|
91
|
-
elsif
|
91
|
+
elsif script_node?(ast_node)
|
92
92
|
ast_node.script.split("\n")
|
93
93
|
end
|
94
94
|
|
@@ -110,7 +110,11 @@ module I18nChecker
|
|
110
110
|
end
|
111
111
|
results
|
112
112
|
end
|
113
|
-
|
113
|
+
|
114
|
+
def script_node?(ast_node)
|
115
|
+
ast_node.is_a?(HamlParser::Ast::Script) || ast_node.is_a?(HamlParser::Ast::SilentScript)
|
116
|
+
end
|
117
|
+
end
|
114
118
|
end
|
115
119
|
end
|
116
120
|
end
|
data/lib/i18n_checker/version.rb
CHANGED