]> git.lyx.org Git - features.git/commitdiff
Parse obsolete entries correctly
authorGeorg Baum <baum@lyx.org>
Thu, 3 Dec 2015 19:52:43 +0000 (20:52 +0100)
committerGeorg Baum <baum@lyx.org>
Thu, 3 Dec 2015 19:52:43 +0000 (20:52 +0100)
We need to remove the #~ prefix of each line, since it is re-added after
wrapping, and because otherwise the comparison with entries from polib
does not work.

development/tools/mergepo.py

index 529605286060b8adb01142a825d7e088d5b4a15e..c5e1f16172fff85f3cd7ee9940cbd3a70a6ba1bc 100644 (file)
@@ -52,7 +52,10 @@ def parse_msg(lines):
         return ''
     msg = lines[0][i:].strip('"')
     for i in range(1, len(lines)):
-        msg = msg + lines[i].strip('"')
+        j = lines[i].find('"')
+        if j < 0:
+            return ''
+        msg = msg + lines[i][j:].strip('"')
     return msg