diff options
author | Michael Birtwell <michael.birtwell@starleaf.com> | 2016-10-12 17:15:43 +0100 |
---|---|---|
committer | Michael Birtwell <michael.birtwell@starleaf.com> | 2016-11-21 14:32:49 +0000 |
commit | 2ba92312514fcac4902c624b571e8c8a7081658b (patch) | |
tree | 5d0d8eacf24bdca65ddb3122fddbd4b57629127f /babel | |
parent | 467bf955711e9224bb9f51a9620282d98e61f6c6 (diff) | |
download | babel-2ba92312514fcac4902c624b571e8c8a7081658b.tar.gz |
pofile reader: Fix multi line msgctxt
Diffstat (limited to 'babel')
-rw-r--r-- | babel/messages/pofile.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py index 2d1854b..47db8a9 100644 --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -190,6 +190,7 @@ class PoFileParser(object): self.offset = lineno if keyword in ['msgid', 'msgid_plural']: + self.in_msgctxt = False self.in_msgid = True self.messages.append(_NormalizedString(arg)) @@ -201,7 +202,9 @@ class PoFileParser(object): self.translations.append([int(idx), _NormalizedString(msg)]) else: self.translations.append([0, _NormalizedString(arg)]) + elif keyword == 'msgctxt': + self.in_msgctxt = True self.context = _NormalizedString(arg) def _process_string_continuation_line(self, line, lineno): |