[open-ils-commits] r8219 - in trunk/build/i18n: scripts tests tests/data

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Dec 15 00:50:49 EST 2007


Author: dbs
Date: 2007-12-15 00:29:49 -0500 (Sat, 15 Dec 2007)
New Revision: 8219

Modified:
   trunk/build/i18n/scripts/basel10n.py
   trunk/build/i18n/scripts/db-seed-i18n.py
   trunk/build/i18n/scripts/fieldmapper.py
   trunk/build/i18n/tests/data/complex.po
   trunk/build/i18n/tests/data/complex.pot
   trunk/build/i18n/tests/data/testidl.pot
   trunk/build/i18n/tests/testIDL.py
   trunk/build/i18n/tests/testSQL.py
   trunk/build/i18n/tests/testbase.py
   trunk/build/i18n/tests/testhelper.py
   trunk/build/i18n/tests/testpo.py
Log:
Update to correspond with polib 0.30.1:
  * occurences->occurrences
  * different handling of header newline characters
Remove some inherited methods that add no new behaviour.


Modified: trunk/build/i18n/scripts/basel10n.py
===================================================================
--- trunk/build/i18n/scripts/basel10n.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/scripts/basel10n.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -38,17 +38,17 @@
             version = 'Evergreen 1.4'
         if date is None:
             date = time.strftime("%Y-%m-%d %H:%M:%S") + '-0400'
-        self.pot.metadata['Project-Id-Version'] = version + r'\n'
+        self.pot.metadata['Project-Id-Version'] = version
         self.pot.metadata['Report-Msgid-Bugs-To'] = \
-            'open-ils-dev at list.georgialibraries.org' + r'\n'
+            'open-ils-dev at list.georgialibraries.org'
         # Cheat and hard-code the time zone offset
-        self.pot.metadata['POT-Creation-Date'] = date + r'\n'
-        self.pot.metadata['PO-Revision-Date'] = 'YEAR-MO-DA HO:MI+ZONE' + r'\n'
-        self.pot.metadata['Last-Translator'] = 'FULL NAME <EMAIL at ADDRESS>' + r'\n'
-        self.pot.metadata['Language-Team'] = 'LANGUAGE <LL at li.org>' + r'\n'
-        self.pot.metadata['MIME-Version'] = '1.0' + r'\n'
-        self.pot.metadata['Content-Type'] = 'text/plain; charset=utf-8' + r'\n'
-        self.pot.metadata['Content-Transfer-Encoding'] = '8-bit' + r'\n'
+        self.pot.metadata['POT-Creation-Date'] = date
+        self.pot.metadata['PO-Revision-Date'] = 'YEAR-MO-DA HO:MI+ZONE'
+        self.pot.metadata['Last-Translator'] = 'FULL NAME <EMAIL at ADDRESS>'
+        self.pot.metadata['Language-Team'] = 'LANGUAGE <LL at li.org>'
+        self.pot.metadata['MIME-Version'] = '1.0'
+        self.pot.metadata['Content-Type'] = 'text/plain; charset=utf-8'
+        self.pot.metadata['Content-Transfer-Encoding'] = '8-bit'
 
     def savepot(self, destination):
         """

Modified: trunk/build/i18n/scripts/db-seed-i18n.py
===================================================================
--- trunk/build/i18n/scripts/db-seed-i18n.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/scripts/db-seed-i18n.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -36,29 +36,11 @@
         basel10n.BaseL10N.__init__(self)
         self.sql = []
 
-    def loadpo(self, potfile):
-        """
-        Load a POT file
-        """
-        basel10n.BaseL10N.loadpo(self, potfile)
-
-    def pothead(self):
-        """
-        Initialize POT metadata
-        """
-        basel10n.BaseL10N.pothead(self)
-
-    def savepot(self, outfile):
-        """
-        Write a POT file
-        """
-        basel10n.BaseL10N.savepot(self, outfile)
-
     def getstrings(self, source):
         """
         Each INSERT statement contains a schema and tablename which we need to
         insert into the config.i18n table. We'll push this into our
-        POEntry.occurences attribute.
+        POEntry.occurrences attribute.
         
         Each INSERT statement also contains 0 or more oils_i18n_gettext()
         markers for the en-US string that we'll use for our msgid attribute.
@@ -92,7 +74,7 @@
                     i18n = re.compile(r'\'\'').sub("'", i18n)
                     if i18n is not None:
                         poe = polib.POEntry()
-                        poe.occurences = [(table, num)]
+                        poe.occurrences = [(table, num)]
                         poe.msgid = i18n
                         self.pot.append(poe)
             num = num + 1
@@ -106,7 +88,7 @@
         insert = "INSERT INTO config.i18n_core (fq_field, identity_value," \
             " translation, string) VALUES ('%s', '%s', '%s', '%s');"
         for entry in self.pot:
-            for table in entry.occurences:
+            for table in entry.occurrences:
                 # Escape SQL single-quotes to avoid b0rkage
                 msgid = re.compile(r'\'').sub("''", entry.msgid)
                 msgstr = re.compile(r'\'').sub("''", entry.msgstr)

Modified: trunk/build/i18n/scripts/fieldmapper.py
===================================================================
--- trunk/build/i18n/scripts/fieldmapper.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/scripts/fieldmapper.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -38,24 +38,6 @@
         self.idl = ''
         self.definitions = []
 
-    def loadpo(self, potfile):
-        """
-        Load a POT file
-        """
-        basel10n.BaseL10N.loadpo(self, potfile)
-
-    def pothead(self):
-        """
-        Initialize POT metadata
-        """
-        basel10n.BaseL10N.pothead(self)
-
-    def savepot(self, outfile):
-        """
-        Write a POT file
-        """
-        basel10n.BaseL10N.savepot(self, outfile)
-
     def get_strings(self, source):
         """
         Extracts translatable strings from the reporter:label attributes
@@ -72,7 +54,7 @@
 
         for entity in handler.entities:
             poe = polib.POEntry()
-            poe.occurences = handler.entities[entity]
+            poe.occurrences = handler.entities[entity]
             poe.msgid = entity
             self.pot.append(poe)
         self.idl = handler.entityized
@@ -83,7 +65,7 @@
         """
         entity = '<!ENTITY %s "%s">'
         for entry in self.pot:
-            for name in entry.occurences:
+            for name in entry.occurrences:
                 if entry.msgstr == '':
                     # No translation available; use the en-US definition
                     self.definitions.append(entity % (name[0], entry.msgid))

Modified: trunk/build/i18n/tests/data/complex.po
===================================================================
--- trunk/build/i18n/tests/data/complex.po	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/data/complex.po	2007-12-15 05:29:49 UTC (rev 8219)
@@ -17,11 +17,12 @@
 
 #: 2475:field.rxbt.voided.label
 msgid ""
+"\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
 "Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
 msgstr "ôèàéç"
 
 #: 524:field.bre.source.label

Modified: trunk/build/i18n/tests/data/complex.pot
===================================================================
--- trunk/build/i18n/tests/data/complex.pot	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/data/complex.pot	2007-12-15 05:29:49 UTC (rev 8219)
@@ -17,11 +17,12 @@
 
 #: 2475:field.rxbt.voided.label
 msgid ""
+"\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
+"Super crazy long and repetitive message ID from hell\n"
 "Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
-"Super crazy long and repetitive message ID from hell"
 msgstr ""
 
 #: 524:field.bre.source.label

Modified: trunk/build/i18n/tests/data/testidl.pot
===================================================================
--- trunk/build/i18n/tests/data/testidl.pot	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/data/testidl.pot	2007-12-15 05:29:49 UTC (rev 8219)
@@ -11,166 +11,166 @@
 "Content-Type: text/plain; charset=utf-8\n"
 "Content-Transfer-Encoding: 8-bit\n"
 
-#: 29:field.auoi.org_unit.label
+#: field.auoi.org_unit.label:29
 msgid "Allowed Org Unit"
 msgstr ""
 
-#: 58:field.rodcirc.checkin_staff.label
+#: field.rodcirc.checkin_staff.label:58
 msgid "Check In Staff"
 msgstr ""
 
-#: 52:class.rodcirc.label
+#: class.rodcirc.label:52
 msgid "Overdue Circulation"
 msgstr ""
 
-#: 76:field.rodcirc.stop_fines_time.label
+#: field.rodcirc.stop_fines_time.label:76
 msgid "Fine Stop Date/Time"
 msgstr ""
 
-#: 57:field.rodcirc.checkin_lib.label
+#: field.rodcirc.checkin_lib.label:57
 msgid "Check In Library"
 msgstr ""
 
-#: 84:field.rodcirc.circ_type.label
+#: field.rodcirc.circ_type.label:84
 msgid "Circulation Type"
 msgstr ""
 
-#: 66:field.rodcirc.fine_interval.label
+#: field.rodcirc.fine_interval.label:66
 msgid "Fine Interval"
 msgstr ""
 
-#: 85:field.rodcirc.billing_total.label
+#: field.rodcirc.billing_total.label:85
 msgid "Billing Totals"
 msgstr ""
 
-#: 64:field.rodcirc.duration.label
+#: field.rodcirc.duration.label:64
 msgid "Circulation Duration"
 msgstr ""
 
-#: 45:field.aws.name.label
+#: field.aws.name.label:45
 msgid "Workstation Name"
 msgstr ""
 
-#: 20:class.auoi.label
+#: class.auoi.label:20
 msgid "User Sharing Opt-in"
 msgstr ""
 
-#: 73:field.rodcirc.recuring_fine_rule.label
+#: field.rodcirc.recuring_fine_rule.label:73
 msgid "Recurring Fine Rule"
 msgstr ""
 
-#: 65:field.rodcirc.duration_rule.label
+#: field.rodcirc.duration_rule.label:65
 msgid "Circ Duration Rule"
 msgstr ""
 
-#: 25:field.auoi.id.label
+#: field.auoi.id.label:25
 msgid "Opt-in ID"
 msgstr ""
 
-#: 86:field.rodcirc.payment_total.label
+#: field.rodcirc.payment_total.label:86
 msgid "Payment Totals"
 msgstr ""
 
-#: 71:field.rodcirc.phone_renewal.label
+#: field.rodcirc.phone_renewal.label:71
 msgid "Phone Renewal"
 msgstr ""
 
-#: 60:field.rodcirc.circ_lib.label
+#: field.rodcirc.circ_lib.label:60
 msgid "Circulating Library"
 msgstr ""
 
-#: 68:field.rodcirc.max_fine.label
+#: field.rodcirc.max_fine.label:68
 msgid "Max Fine Amount"
 msgstr ""
 
-#: 79:field.rodcirc.xact_finish.label
+#: field.rodcirc.xact_finish.label:79
 msgid "Transaction Finish Date/Time"
 msgstr ""
 
-#: 28:field.auoi.usr.label
+#: field.auoi.usr.label:28
 msgid "User"
 msgstr ""
 
-#: 26:field.auoi.opt_in_ws.label 39:class.aws.label
+#: field.auoi.opt_in_ws.label:26 class.aws.label:39
 msgid "Workstation"
 msgstr ""
 
-#: 75:field.rodcirc.stop_fines.label
+#: field.rodcirc.stop_fines.label:75
 msgid "Fine Stop Reason"
 msgstr ""
 
-#: 70:field.rodcirc.opac_renewal.label
+#: field.rodcirc.opac_renewal.label:70
 msgid "OPAC Renewal"
 msgstr ""
 
-#: 61:field.rodcirc.circ_staff.label
+#: field.rodcirc.circ_staff.label:61
 msgid "Circulating Staff"
 msgstr ""
 
-#: 82:field.rodcirc.payments.label
+#: field.rodcirc.payments.label:82
 msgid "Transaction Payments"
 msgstr ""
 
-#: 59:field.rodcirc.checkin_time.label
+#: field.rodcirc.checkin_time.label:59
 msgid "Check In Date/Time"
 msgstr ""
 
-#: 69:field.rodcirc.max_fine_rule.label
+#: field.rodcirc.max_fine_rule.label:69
 msgid "Max Fine Rule"
 msgstr ""
 
-#: 80:field.rodcirc.xact_start.label
+#: field.rodcirc.xact_start.label:80
 msgid "Check Out Date/Time"
 msgstr ""
 
-#: 83:field.rodcirc.billable_transaction.label
+#: field.rodcirc.billable_transaction.label:83
 msgid "Base Transaction"
 msgstr ""
 
-#: 72:field.rodcirc.recuring_fine.label
+#: field.rodcirc.recuring_fine.label:72
 msgid "Recurring Fine Amount"
 msgstr ""
 
-#: 27:field.auoi.staff.label
+#: field.auoi.staff.label:27
 msgid "Staff Member"
 msgstr ""
 
-#: 44:field.aws.id.label
+#: field.aws.id.label:44
 msgid "Workstation ID"
 msgstr ""
 
-#: 78:field.rodcirc.usr.label
+#: field.rodcirc.usr.label:78
 msgid "Patron"
 msgstr ""
 
-#: 63:field.rodcirc.due_date.label
+#: field.rodcirc.due_date.label:63
 msgid "Due Date/Time"
 msgstr ""
 
-#: 81:field.rodcirc.billings.label
+#: field.rodcirc.billings.label:81
 msgid "Transaction Billings"
 msgstr ""
 
-#: 30:field.auoi.opt_in_ts.label
+#: field.auoi.opt_in_ts.label:30
 msgid "Opt-in Date/Time"
 msgstr ""
 
-#: 62:field.rodcirc.desk_renewal.label
+#: field.rodcirc.desk_renewal.label:62
 msgid "Desk Renewal"
 msgstr ""
 
-#: 77:field.rodcirc.target_copy.label
+#: field.rodcirc.target_copy.label:77
 msgid "Circulating Item"
 msgstr ""
 
-#: 74:field.rodcirc.renewal_remaining.label
+#: field.rodcirc.renewal_remaining.label:74
 msgid "Remaining Renewals"
 msgstr ""
 
-#: 46:field.aws.owning_lib.label
+#: field.aws.owning_lib.label:46
 msgid "Owning Library"
 msgstr ""
 
-#: 67:field.rodcirc.id.label
+#: field.rodcirc.id.label:67
 msgid "Circ ID"
 msgstr ""

Modified: trunk/build/i18n/tests/testIDL.py
===================================================================
--- trunk/build/i18n/tests/testIDL.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/testIDL.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -9,8 +9,6 @@
 
 import filecmp
 import os
-import polib
-import re
 import subprocess
 import testhelper
 import unittest
@@ -40,7 +38,7 @@
         Convert an en-US IDL file to an entityized version
         """
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(
+        subprocess.Popen(
             ('python', self.script, '--convert', self.idlfile,
             '--output', self.saveidlent),
             0, None, None, devnull, devnull).wait()
@@ -52,7 +50,7 @@
         Create a POT file from a fieldmapper IDL file
         """
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(
+        subprocess.Popen(
             ('python', self.script, '--pot', self.idlfile,
             '--output', self.savepot),
             0, None, None, devnull, devnull).wait()
@@ -68,7 +66,7 @@
         Generate an entity definition file from a PO file
         """
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(
+        subprocess.Popen(
             ('python', self.script, '--entity', self.testpo,
             '--output', self.saveentities),
             0, None, None, devnull, devnull).wait()

Modified: trunk/build/i18n/tests/testSQL.py
===================================================================
--- trunk/build/i18n/tests/testSQL.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/testSQL.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -32,8 +32,7 @@
         """
         Create a POT file from our test SQL statements.
         """
-        devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(
+        subprocess.Popen(
             ('python', self.script, '--pot', self.sqlsource,
             '--output', self.testpot),
             0, None, None).wait()
@@ -49,7 +48,7 @@
         Create a SQL file from a translated PO file.
         """
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(
+        subprocess.Popen(
             ('python', self.script, '--sql', self.canonpo,
             '--locale', 'zz-ZZ', '--output', self.testsql),
             0, None, None, devnull, devnull).wait()

Modified: trunk/build/i18n/tests/testbase.py
===================================================================
--- trunk/build/i18n/tests/testbase.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/testbase.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -20,19 +20,19 @@
     poentries = [{
         'msgid': 'Using Library', 
         'msgstr': 'Utiliser la bibliothèque',
-        'occurences': [
+        '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': 'ôèàéç',
-        'occurences': [
+        'occurrences': [
             {'line': 2475, 'name': 'field.rxbt.voided.label'},
         ]},
         {
         'msgid': 'Record Source', 
-        'occurences': [
+        'occurrences': [
             {'line': 524, 'name': 'field.bre.source.label'},
         ]},
     ]
@@ -40,15 +40,15 @@
     def setUp(self):
         sys.path.append(os.path.join(self.basedir, '../scripts/'))
         self.tearDown()
-        for dir in self.tmpdirs:
-            os.mkdir(dir)
+        for tmpdir in self.tmpdirs:
+            os.mkdir(tmpdir)
 
     def tearDown(self):
-        for dir in self.tmpdirs:
-            if os.access(dir, os.F_OK):
-                for file in os.listdir(dir):
-                    os.remove(os.path.join(dir, file))
-                os.rmdir(dir)
+        for tmpdir in self.tmpdirs:
+            if os.access(tmpdir, os.F_OK):
+                for tmpfile in os.listdir(tmpdir):
+                    os.remove(os.path.join(tmpdir, tmpfile))
+                os.rmdir(tmpdir)
 
     def testload(self):
         """
@@ -59,13 +59,13 @@
         poload.loadpo(self.canonpo)
         pogen = basel10n.BaseL10N()
         pogen.pothead('Evergreen 1.4', '1999-12-31 23:59:59 -0400')
-        pogen.pot.metadata['PO-Revision-Date'] = '2007-12-08 23:14:20 -0400\\n'
-        pogen.pot.metadata['Last-Translator'] = ' Dan Scott <dscott at laurentian.ca>\\n'
-        pogen.pot.metadata['Language-Team'] = 'fr-CA <LL at li.org>\\n'
+        pogen.pot.metadata['PO-Revision-Date'] = '2007-12-08 23:14:20 -0400'
+        pogen.pot.metadata['Last-Translator'] = ' Dan Scott <dscott at laurentian.ca>'
+        pogen.pot.metadata['Language-Team'] = 'fr-CA <LL at li.org>'
         for msg in self.poentries:
             poe = polib.POEntry()
-            for x in msg['occurences']:
-                poe.occurences.append((x['line'], x['name']))
+            for x in msg['occurrences']:
+                poe.occurrences.append((x['line'], x['name']))
             poe.msgid = msg['msgid']
             if msg.has_key('msgstr'):
                 poe.msgstr = msg['msgstr']
@@ -82,8 +82,8 @@
         pogen.pothead('Evergreen 1.4', '1999-12-31 23:59:59 -0400')
         for msg in self.poentries:
             poe = polib.POEntry()
-            for x in msg['occurences']:
-                poe.occurences.append((x['line'], x['name']))
+            for x in msg['occurrences']:
+                poe.occurrences.append((x['line'], x['name']))
             poe.msgid = msg['msgid']
             pogen.pot.append(poe)
         pogen.savepot(self.savefile)

Modified: trunk/build/i18n/tests/testhelper.py
===================================================================
--- trunk/build/i18n/tests/testhelper.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/testhelper.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -19,18 +19,18 @@
         mungefile.write(line)
     mungefile.close()
 
-def setUp(self):
-    sys.path.append(os.path.join(self.basedir, '../scripts/'))
-    sys.path.append(self.basedir)
-    self.tearDown()
-    for dir in self.tmpdirs:
-        os.mkdir(dir)
+def setUp(obj):
+    sys.path.append(os.path.join(obj.basedir, '../scripts/'))
+    sys.path.append(obj.basedir)
+    obj.tearDown()
+    for tmpdir in obj.tmpdirs:
+        os.mkdir(tmpdir)
 
-def tearDown(self):
-    for dir in self.tmpdirs:
-        if os.access(dir, os.F_OK):
-            for file in os.listdir(dir):
-                os.remove(os.path.join(dir, file))
-            os.rmdir(dir)
+def tearDown(obj):
+    for tmpdir in obj.tmpdirs:
+        if os.access(tmpdir, os.F_OK):
+            for tmpfile in os.listdir(tmpdir):
+                os.remove(os.path.join(tmpdir, tmpfile))
+            os.rmdir(tmpdir)
 
 

Modified: trunk/build/i18n/tests/testpo.py
===================================================================
--- trunk/build/i18n/tests/testpo.py	2007-12-15 03:05:36 UTC (rev 8218)
+++ trunk/build/i18n/tests/testpo.py	2007-12-15 05:29:49 UTC (rev 8219)
@@ -31,10 +31,10 @@
         devnull = open('/dev/null', 'w')
         os.mkdir('tests/tmp')
         os.mkdir(self.project_dir)
-        proc = subprocess.Popen(('cp', '-r', 'po', 'tests/tmp'), 0, None, None, devnull, devnull).wait()
-        proc = subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newpot'), 0, None, None, devnull, devnull).wait()
-        proc = subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newpo'), 0, None, None, devnull, devnull).wait()
-        proc = subprocess.Popen(('make', 'LOCALE=ll-LL', 'PROJECT=tests/tmp/locale', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newproject'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('cp', '-r', 'po', 'tests/tmp'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newpot'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newpo'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('make', 'LOCALE=ll-LL', 'PROJECT=tests/tmp/locale', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'newproject'), 0, None, None, devnull, devnull).wait()
         devnull.close()
 
     def tearDown(self):
@@ -101,7 +101,7 @@
 
         # Regenerate the project files to get the translated strings in place
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'updateproject'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'updateproject'), 0, None, None, devnull, devnull).wait()
 
         self.assertEqual(filecmp.cmp(commonprops, testprops), 1)
 
@@ -136,7 +136,7 @@
 
         # Update the PO files to get the translated strings in place
         devnull = open('/dev/null', 'w')
-        proc = subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'updatepo'), 0, None, None, devnull, devnull).wait()
+        subprocess.Popen(('make', 'LOCALE=ll-LL', 'POINDIR=tests/tmp/po', 'POOUTDIR=tests/tmp/po', 'updatepo'), 0, None, None, devnull, devnull).wait()
 
         commonprops = os.path.join(self.locale_dir, 'common.properties.po')
         tempprops = os.path.join(self.locale_dir, 'temp.properties.po')



More information about the open-ils-commits mailing list