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

This commit is contained in:
Christian Heimes 2007-10-31 18:53:44 +00:00
parent c6ecfcd876
commit 6ae5d7f2a1
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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>')