gettext_i18n_rails_js 1.0.3 → 1.0.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e1a1b94026798a925925c54bfb7d293f95565c
|
4
|
+
data.tar.gz: aaef6c498343a5a99743c094dc0ddc214b587dee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 534dd004d25c63d600c0cd8e2bb84f96ee7fe309a18bf7ac8bcb23389cb3ff7e94fce0c22b83f0bc14665163e56fd35976da58b01a8d81b352f5e0b0435a5e76
|
7
|
+
data.tar.gz: 408a65e8ea88a8987049c0c409906a825d21d9e2d2ceb6fe79ade5ee5149e00f8da0bd3130e886cb373a4f016665a7919eaafe4e90011a25f5581bc461134c40
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.0.4](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.4) - 2016-05-31
|
4
|
+
|
5
|
+
* Support ES2015 template strings (@bradbarrow)
|
6
|
+
|
3
7
|
## [1.0.3](https://github.com/webhippie/gettext_i18n_rails_js/releases/tag/v1.0.3) - 2015-11-03
|
4
8
|
|
5
9
|
* Stop using bundler within the core lib (@domcleal)
|
@@ -73,7 +73,7 @@ module GettextI18nRailsJs
|
|
73
73
|
def parse(file, _msgids = [])
|
74
74
|
collect_for(file) do |function, arguments, line|
|
75
75
|
key = arguments.scan(
|
76
|
-
/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/
|
76
|
+
/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/
|
77
77
|
).collect do |match|
|
78
78
|
match.first[1..-2]
|
79
79
|
end.join(separator_for(function))
|
@@ -123,6 +123,22 @@ describe GettextI18nRailsJs::Parser::Javascript do
|
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
|
+
it "finds messages with newlines/tabs (backticks)" do
|
127
|
+
content = <<-'EOF'
|
128
|
+
bla = __(`xxxx\n\tfoo`)
|
129
|
+
EOF
|
130
|
+
|
131
|
+
with_file content do |path|
|
132
|
+
expect(parser.parse(path, [])).to(
|
133
|
+
eq(
|
134
|
+
[
|
135
|
+
["xxxx\\n\\tfoo", "#{path}:1"]
|
136
|
+
]
|
137
|
+
)
|
138
|
+
)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
126
142
|
it "finds interpolated multi-line messages" do
|
127
143
|
content = <<-'EOF'
|
128
144
|
""" Parser should grab
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettext_i18n_rails_js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Boerger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -178,18 +178,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 2.
|
181
|
+
rubygems_version: 2.2.5
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Extends gettext_i18n_rails making your .po files available to client side
|
185
185
|
javascript as JSON
|
186
186
|
test_files:
|
187
|
-
- spec/fixtures/example.coffee
|
188
|
-
- spec/fixtures/example.handlebars
|
189
187
|
- spec/fixtures/example.js
|
190
|
-
- spec/
|
188
|
+
- spec/fixtures/example.handlebars
|
189
|
+
- spec/fixtures/example.coffee
|
190
|
+
- spec/support/with_file.rb
|
191
191
|
- spec/gettext_i18n_rails_js/parser/javascript_spec.rb
|
192
|
+
- spec/gettext_i18n_rails_js/parser/handlebars_spec.rb
|
192
193
|
- spec/gettext_i18n_rails_js_spec.rb
|
193
194
|
- spec/spec_helper.rb
|
194
|
-
- spec/support/with_file.rb
|
195
195
|
has_rdoc:
|