]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - fixup-migrate-gettext.rb
Correct parsing of previous string to handle colons.
[text-madewithcc.git] / 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