path = []
msgstr = ''
f.each_line { |line|
- line = line.strip
+ line.strip!
if line[0..8] == 'msgctxt "'
path = line[9..-2].split(':')
elsif line[0..7] == 'msgstr "'
msgstr = line[8..-2]
end
-
+
if !path.empty? and !msgstr.empty?
add_translation(trs, path, msgstr)
path = []