From dc4585080d4ba80c84fa23e3f60cba47263807fa Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Fri, 12 Aug 2016 16:20:50 +0200 Subject: [PATCH] Support multiline message ids. --- src/i18n/helpers/polint.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/i18n/helpers/polint.py b/src/i18n/helpers/polint.py index 739f0a62..614c28ed 100755 --- a/src/i18n/helpers/polint.py +++ b/src/i18n/helpers/polint.py @@ -62,8 +62,11 @@ def parsepo(fn): msgstr = None elif line.startswith("msgstr"): msgstr = line.strip()[8:-1] - elif line.startswith('"') and msgstr is not None and msgid is not None: - msgstr += line.strip()[1:-1] + elif line.startswith('"'): + if msgstr is None: + msgid += line.strip()[1:-1] + elif msgstr is not None: + msgstr += line.strip()[1:-1] elif line.startswith("#. Default: "): default = line.strip()[13:-1] elif line.startswith("#"):