[open-ils-commits] r8180 - in trunk/build/i18n: scripts tests
tests/data
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Dec 9 00:22:37 EST 2007
Author: dbs
Date: 2007-12-09 00:02:28 -0500 (Sun, 09 Dec 2007)
New Revision: 8180
Added:
trunk/build/i18n/tests/data/
trunk/build/i18n/tests/data/complex.po
trunk/build/i18n/tests/data/complex.pot
Modified:
trunk/build/i18n/scripts/basel10n.py
Log:
Make BaseL10N more flexible about creation timestamp.
Add one test for loading PO files, along with required data files.
Modified: trunk/build/i18n/scripts/basel10n.py
===================================================================
--- trunk/build/i18n/scripts/basel10n.py 2007-12-09 04:44:45 UTC (rev 8179)
+++ trunk/build/i18n/scripts/basel10n.py 2007-12-09 05:02:28 UTC (rev 8180)
@@ -29,19 +29,20 @@
def __init__(self):
self.pot = polib.POFile()
- def pothead(self, version=None):
+ def pothead(self, version=None, date=None):
"""
Initializes the header for a POT file to reasonable defaults
"""
# We should be smarter about the Project-Id-Version attribute
if version is None:
version = 'Evergreen 1.4'
- date = time.strftime("%Y-%m-%d %H:%M:%S")
+ if date is None:
+ date = time.strftime("%Y-%m-%d %H:%M:%S") + '-0400'
self.pot.metadata['Project-Id-Version'] = version
self.pot.metadata['Report-Msgid-Bugs-To'] = \
'open-ils-dev at list.georgialibraries.org'
# Cheat and hard-code the time zone offset
- self.pot.metadata['POT-Creation-Date'] = "%s %s" % (date, '-0400')
+ 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>'
Added: trunk/build/i18n/tests/data/complex.po
===================================================================
--- trunk/build/i18n/tests/data/complex.po (rev 0)
+++ trunk/build/i18n/tests/data/complex.po 2007-12-09 05:02:28 UTC (rev 8180)
@@ -0,0 +1,29 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Evergreen 1.4"
+"Report-Msgid-Bugs-To: open-ils-dev at list.georgialibraries.org"
+"POT-Creation-Date: 1999-12-31 23:59:59 -0400"
+"PO-Revision-Date: 2007-12-08 23:14:20 -0400"
+"Last-Translator: Dan Scott <dscott at laurentian.ca>"
+"Language-Team: fr-CA <LL at li.org>"
+"MIME-Version: 1.0"
+"Content-Type: text/plain; charset=utf-8"
+"Content-Transfer-Encoding: 8-bit"
+
+#: 240:field.aihu.org_unit.label 257:field.ancihu.org_unit.label
+msgid "Using Library"
+msgstr "Utiliser la bibliothèque"
+
+#: 2475:field.rxbt.voided.label
+msgid ""
+"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
+msgid "Record Source"
+msgstr ""
Added: trunk/build/i18n/tests/data/complex.pot
===================================================================
--- trunk/build/i18n/tests/data/complex.pot (rev 0)
+++ trunk/build/i18n/tests/data/complex.pot 2007-12-09 05:02:28 UTC (rev 8180)
@@ -0,0 +1,29 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Evergreen 1.4"
+"Report-Msgid-Bugs-To: open-ils-dev at list.georgialibraries.org"
+"POT-Creation-Date: 2007-12-06 23:16:35 -0400"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>"
+"Language-Team: LANGUAGE <LL at li.org>"
+"MIME-Version: 1.0"
+"Content-Type: text/plain; charset=utf-8"
+"Content-Transfer-Encoding: 8-bit"
+
+#: 240:field.aihu.org_unit.label 257:field.ancihu.org_unit.label
+msgid "Using Library"
+msgstr ""
+
+#: 2475:field.rxbt.voided.label
+msgid ""
+"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
+msgid "Record Source"
+msgstr ""
More information about the open-ils-commits
mailing list