lib/i18n_screwdriver.rb in i18n_screwdriver-3.0.0 vs lib/i18n_screwdriver.rb in i18n_screwdriver-3.0.1
- old
+ new
@@ -27,12 +27,12 @@
end
end
def self.grab_texts_to_be_translated(string)
[].tap do |texts|
- texts.concat(string.scan(/_\("([^"]*)"\)/).map{ |v| v[0] })
- texts.concat(string.scan(/_\('([^']*)'\)/).map{ |v| v[0] })
+ texts.concat(string.scan(/_\("(.*?)"\)/).map{ |v| unescape_string(v[0]) })
+ texts.concat(string.scan(/_\('(.*?)'\)/).map{ |v| unescape_string(v[0]) })
end
end
def self.in_utf8(hash)
{}.tap do |result|
@@ -52,11 +52,11 @@
result << "\r"
when 'n'
result << "\n"
when 't'
result << "\t"
- when '\\'
- result << '\\'
+ when '"', "'", '\\'
+ result << char
else
result << '\\'
result << char
end
in_backslash = false