Author: christian.heimes
Date: Wed Oct 31 19:53:44 2007
New Revision: 58732
Modified:
python/branches/py3k/Lib/gettext.py
python/branches/py3k/Lib/test/test_gettext.py
Log:
Fixed gettext module for Windows. The metadata lines always end in \n and not
in os.linesep
Modified: python/branches/py3k/Lib/gettext.py
==============================================================================
--- python/branches/py3k/Lib/gettext.py (original)
+++ python/branches/py3k/Lib/gettext.py Wed Oct 31 19:53:44 2007
@@ -291,7 +291,7 @@
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
Modified: python/branches/py3k/Lib/test/test_gettext.py
==============================================================================
--- python/branches/py3k/Lib/test/test_gettext.py (original)
+++ python/branches/py3k/Lib/test/test_gettext.py Wed Oct 31 19:53:44 2007
@@ -332,6 +332,7 @@
def test_weird_metadata(self):
info = self.t.info()
+ self.assertEqual(len(info), 9)
self.assertEqual(info['last-translator'],
'John Doe <[EMAIL PROTECTED]>\nJane Foobar <[EMAIL PROTECTED]>')
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins