i18n_screwdriver 9.1 → 9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/i18n_screwdriver/version.rb +1 -1
- data/lib/i18n_screwdriver.rb +1 -0
- data/spec/i18n_screwdriver_spec.rb +5 -0
- 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: dbe8ce60e602808de3bed486e4996074699f1081
|
4
|
+
data.tar.gz: 0166cae973e6c9729c45d92e8c1ded33a3bd61be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85676b094e7a2cae208da19d6cea5ede7ade91f3700c0de117aaa25c2d3443414a1f5a463483d81af00beff8a9e4a7b4e04e4a15a2cda00fe2a45b43e7b53a49
|
7
|
+
data.tar.gz: 3a8306d4671148b31eb6d1002bdf9591bddea00fa8a71b407b43e316d52b513afce18f07b5a6c392ca8f7d3948c62b9c9782bba8c0ed71890f563b53bcac8915
|
data/lib/i18n_screwdriver.rb
CHANGED
@@ -49,6 +49,7 @@ module I18nScrewdriver
|
|
49
49
|
[].tap do |texts|
|
50
50
|
texts.concat(string.scan(/\bI18n\.screw\(?\s*(?<!\\)"(.*?)(?<!\\)"/).map{ |v| unescape_string(v[0]) })
|
51
51
|
texts.concat(string.scan(/\bI18n\.screw\(?\s*(?<!\\)'(.*?)(?<!\\)'/).map{ |v| unescape_string(v[0]) })
|
52
|
+
texts.concat(string.scan(/\bI18n\.screw\(?\s*(?<!\\)`(.*?)(?<!\\)`/).map{ |v| unescape_string(v[0]) })
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
@@ -14,6 +14,11 @@ describe I18nScrewdriver do
|
|
14
14
|
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw('Hi %{name}!', name: "gucki")|)).to eq(["Hi %{name}!"])
|
15
15
|
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw 'test!'|)).to eq(["test!"])
|
16
16
|
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw 'Hi %{name}!', name: "gucki"|)).to eq(["Hi %{name}!"])
|
17
|
+
|
18
|
+
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw(`test!`)|)).to eq(["test!"])
|
19
|
+
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw( `test!`)|)).to eq(["test!"])
|
20
|
+
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw(`Hi ${name}!`)"|)).to eq(["Hi ${name}!"])
|
21
|
+
expect(I18nScrewdriver.grab_js_texts_to_be_translated(%|=I18n.screw(`Hi %{name}!`, name: "gucki")|)).to eq(["Hi %{name}!"])
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|