From a41d62ae57afa569b00551851dc0bde257c269a8 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sun, 18 Feb 2018 11:17:51 +0000 Subject: [PATCH] Correct parsing of previous string to handle colons. --- fixup-migrate-gettext.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fixup-migrate-gettext.rb b/fixup-migrate-gettext.rb index 66785d3..2c172fb 100755 --- a/fixup-migrate-gettext.rb +++ b/fixup-migrate-gettext.rb @@ -22,9 +22,11 @@ class PoStr @type = value if type == '.' and field == 'type' @location = {:file => field, :line => value} if type == ':' if type == '|' - if field =~ /^msgid "(.*)"/ + #print lin, "\n" + if lin =~ /^\#\| msgid "(.*)"$/ + #print "first '%s'\n" % $1 @prev << $1 - elsif field =~ /^"(.*)"$/ + elsif lin =~ /^\#\| "(.*)"$/ @prev << $1 end end -- 2.47.2