[open-ils-commits] r15086 - in trunk/build/i18n/tests: . data (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Dec 4 14:13:17 EST 2009


Author: dbs
Date: 2009-12-04 14:13:13 -0500 (Fri, 04 Dec 2009)
New Revision: 15086

Modified:
   trunk/build/i18n/tests/data/complex.po
   trunk/build/i18n/tests/testbase.py
Log:
Make tests line up with current reality - lines after IDs

Modified: trunk/build/i18n/tests/data/complex.po
===================================================================
--- trunk/build/i18n/tests/data/complex.po	2009-12-04 18:46:52 UTC (rev 15085)
+++ trunk/build/i18n/tests/data/complex.po	2009-12-04 19:13:13 UTC (rev 15086)
@@ -11,11 +11,11 @@
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8-bit\n"
 
-#: 240:field.aihu.org_unit.label 257:field.ancihu.org_unit.label
+#: field.aihu.org_unit.label:240 field.ancihu.org_unit.label:257
 msgid "Using Library"
 msgstr "Utiliser la bibliothèque"
 
-#: 2475:field.rxbt.voided.label
+#: field.rxbt.voided.label:2475
 msgid ""
 "\n"
 "Super crazy long and repetitive message ID from hell\n"
@@ -25,6 +25,6 @@
 "Super crazy long and repetitive message ID from hell"
 msgstr "ôèàéç"
 
-#: 524:field.bre.source.label
+#: field.bre.source.label:524
 msgid "Record Source"
 msgstr ""

Modified: trunk/build/i18n/tests/testbase.py
===================================================================
--- trunk/build/i18n/tests/testbase.py	2009-12-04 18:46:52 UTC (rev 15085)
+++ trunk/build/i18n/tests/testbase.py	2009-12-04 19:13:13 UTC (rev 15086)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python
+# -*- coding: utf=8 -*-
 # vim: set fileencoding=utf-8 :
 """
 Test the BaseL10N class to ensure that we have a solid foundation.
@@ -19,14 +20,14 @@
     canonpo = os.path.join(basedir, 'data/complex.po')
     poentries = [{
         'msgid': 'Using Library', 
-        'msgstr': 'Utiliser la bibliothèque',
+        'msgstr': u'Utiliser la bibliothèque',
         'occurrences': [
             {'line': 240, 'name': 'field.aihu.org_unit.label'},
             {'line': 257, 'name': 'field.ancihu.org_unit.label'},
         ]},
         {
         'msgid': '\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell\nSuper crazy long and repetitive message ID from hell', 
-        'msgstr': 'ôèàéç',
+        'msgstr': u'ôèàéç',
         'occurrences': [
             {'line': 2475, 'name': 'field.rxbt.voided.label'},
         ]},
@@ -65,13 +66,13 @@
         for msg in self.poentries:
             poe = polib.POEntry()
             for x in msg['occurrences']:
-                poe.occurrences.append((x['line'], x['name']))
+                poe.occurrences.append((x['name'], x['line']))
             poe.msgid = msg['msgid']
             if msg.has_key('msgstr'):
                 poe.msgstr = msg['msgstr']
             pogen.pot.append(poe)
 
-        self.assertEqual(str(poload), str(pogen))
+        self.assertEqual(unicode(poload), unicode(pogen))
 
     def testsavepot(self):
         """



More information about the open-ils-commits mailing list