lib/knj/gettext_threadded.rb in knjrbfw-0.0.98 vs lib/knj/gettext_threadded.rb in knjrbfw-0.0.99
- old
+ new
@@ -39,11 +39,11 @@
cont = nil
File.open(pofn, "r", {:encoding => @args[:encoding]}) do |fp|
cont = fp.read.encode("utf-8")
end
- cont.scan(/msgid\s+\"(.+)\"\nmsgstr\s+\"(.+)\"\n\n/) do |match|
- @langs[file][match[0]] = match[1].to_s.encode("utf-8")
+ cont.scan(/msgid\s+\"(.+)\"(\r|)\nmsgstr\s+\"(.+)\"(\r|)\n(\r|)\n/) do |match|
+ @langs[file][match[0]] = match[2].to_s.encode("utf-8")
end
end
end
end
end
\ No newline at end of file