Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15eac1f commit 7de63f5Copy full SHA for 7de63f5
1 file changed
Lib/gettext.py
@@ -261,14 +261,19 @@ def _parse(self, fp):
261
# See if we're looking at GNU .mo conventions for metadata
262
if mlen == 0:
263
# Catalog description
264
+ lastk = None
265
for item in tmsg.splitlines():
266
item = item.strip()
267
if not item:
268
continue
- k, v = item.split(':', 1)
269
- k = k.strip().lower()
270
- v = v.strip()
271
- self._info[k] = v
+ if ':' in item:
+ k, v = item.split(':', 1)
+ k = k.strip().lower()
272
+ v = v.strip()
273
+ self._info[k] = v
274
+ lastk = k
275
+ elif lastk:
276
+ self._info[lastk] += '\n' + item
277
if k == 'content-type':
278
self._charset = v.split('charset=')[1]
279
elif k == 'plural-forms':
0 commit comments