Fixed gettext module for Windows. The metadata lines always end in \n and not in os.linesep
This commit is contained in:
parent
c6ecfcd876
commit
6ae5d7f2a1
|
@ -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>')
|
||||
|
||||
|
|
Loading…
Reference in New Issue