Kaydet (Commit) 6ae5d7f2 authored tarafından Christian Heimes's avatar Christian Heimes

Fixed gettext module for Windows. The metadata lines always end in \n and not in os.linesep

üst c6ecfcd8
......@@ -291,7 +291,7 @@ class GNUTranslations(NullTranslations):
if mlen == 0:
# Catalog description
lastk = k = None
for b_item in tmsg.split(os.linesep.encode("ascii")):
for b_item in tmsg.split('\n'.encode("ascii")):
item = str(b_item).strip()
if not item:
continue
......
......@@ -332,6 +332,7 @@ class WeirdMetadataTest(GettextBaseTest):
def test_weird_metadata(self):
info = self.t.info()
self.assertEqual(len(info), 9)
self.assertEqual(info['last-translator'],
'John Doe <jdoe@example.com>\nJane Foobar <jfoobar@example.com>')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment