i18n-tasks 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adca7ca6bf65af74c2a4e88e30179281471f1b391a9dec1885031f6e4b5d104c
|
4
|
+
data.tar.gz: 82bfb0f4dd4d614fc93b34427e9e4d6aee2c2e3f9a9115d3b89bb1938edfeb8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac7dfdb7bcfa4ccf412b9afeb5d309d86d6a49dbbfe6c39d2128aff5e5cf8b1ee29cc8a7089975e1c0677c79c63985f19ebf6175010e9a7e21e02ebf2aca3323
|
7
|
+
data.tar.gz: f05bc85a3df41d6eb857fb3f52f20328093c28ee3595c5dc3acbbbab8a2dfd5462712052e6237b53cff2f53c5971f006dd5a840fc09987ef6b246d5a4b6fd214
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ i18n-tasks can be used with any project using the ruby [i18n gem][i18n-gem] (def
|
|
24
24
|
Add i18n-tasks to the Gemfile:
|
25
25
|
|
26
26
|
```ruby
|
27
|
-
gem 'i18n-tasks', '~> 1.0.
|
27
|
+
gem 'i18n-tasks', '~> 1.0.3'
|
28
28
|
```
|
29
29
|
|
30
30
|
Copy the default [configuration file](#configuration):
|
@@ -223,7 +223,7 @@ See the full list of tasks with `i18n-tasks --help`.
|
|
223
223
|
|
224
224
|
### Features and limitations
|
225
225
|
|
226
|
-
`i18n-tasks` uses an AST scanner for `.rb` files, and a regexp-based scanner for other files, such as `.haml`.
|
226
|
+
`i18n-tasks` uses an AST scanner for `.rb` and `.html.erb` files, and a regexp-based scanner for other files, such as `.haml`.
|
227
227
|
|
228
228
|
#### Relative keys
|
229
229
|
|
@@ -52,6 +52,8 @@ module I18n::Tasks::Scanners
|
|
52
52
|
# @param local_location {Parser::Source::Map} Local location in the parsed string
|
53
53
|
# @return {Parser::Source::Map}
|
54
54
|
def updated_location(global_location, local_location)
|
55
|
+
return global_location if local_location.expression.nil?
|
56
|
+
|
55
57
|
range = ::Parser::Source::Range.new(
|
56
58
|
global_location.expression.source_buffer,
|
57
59
|
global_location.expression.to_range.begin + local_location.expression.to_range.begin,
|
@@ -48,7 +48,7 @@ module I18n::Tasks
|
|
48
48
|
# rubocop:enable Metrics/ParameterLists
|
49
49
|
|
50
50
|
def inspect
|
51
|
-
"Occurrence(
|
51
|
+
"Occurrence(#{@path}:#{@line_num}, line_pos: #{@line_pos}, pos: #{@pos}, raw_key: #{@raw_key}, default_arg: #{@default_arg}, line: #{@line})"
|
52
52
|
end
|
53
53
|
|
54
54
|
def ==(other)
|
data/lib/i18n/tasks/version.rb
CHANGED