]> pere.pagekite.me Git - text-madewithcc.git/commitdiff
Correct parsing of previous string to handle colons.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 18 Feb 2018 11:17:51 +0000 (11:17 +0000)
committerPetter Reinholdtsen <pere@hungry.com>
Thu, 22 Feb 2018 18:12:09 +0000 (18:12 +0000)
fixup-migrate-gettext.rb

index 66785d3d65bfa8c1e65f537a78304c020e87e572..2c172fbe9a34b0f920b1f6ab58ac0886955c511e 100755 (executable)
@@ -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