Comment 2 for bug 848950

Revision history for this message
TLE (k-nielsen81) wrote :

Ok, so this is actually a gtparse error. The problem as I could see it is that the method extract_string does this:
if not line.startswith(header + ' "'):
but for some reason the header for the msgctxt already contains its ' "', so it can be fixed by this diff:

=== modified file 'pyg3t/gtparse.py'
--- pyg3t/gtparse.py 2011-06-19 17:20:03 +0000
+++ pyg3t/gtparse.py 2011-09-14 12:37:27 +0000
@@ -430,7 +430,7 @@
     return ''.join([headerline] + otherlines)

 linepatterns = dict(comment='#',
- msgctxt='msgctxt "',
+ msgctxt='msgctxt', # Used to be 'msgctxt "'
                     msgid='msgid',
                     msgid_plural='msgid_plural',
                     msgstr='msgstr',

However, I cannot really see if there is a particular reason that it was like that.