[open-ils-commits] r1291 - servres/branches/i18n/conifer (gfawcett)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Mar 28 21:53:35 EDT 2011
Author: gfawcett
Date: 2011-03-28 21:53:33 -0400 (Mon, 28 Mar 2011)
New Revision: 1291
Modified:
servres/branches/i18n/conifer/pybabel-extract
Log:
teach our poxx'ifier to poxxify plural forms.
Ned Batchelder's code didn't handle 'msgstr_plural' values.
Modified: servres/branches/i18n/conifer/pybabel-extract
===================================================================
--- servres/branches/i18n/conifer/pybabel-extract 2011-03-29 00:56:15 UTC (rev 1290)
+++ servres/branches/i18n/conifer/pybabel-extract 2011-03-29 01:53:33 UTC (rev 1291)
@@ -95,9 +95,18 @@
po = polib.pofile(fname)
count = 0
for entry in po:
- hamm = HtmlAwareMessageMunger()
- hamm.feed(entry.msgid)
- entry.msgstr = hamm.result()
+ if entry.msgid_plural:
+ hamm = HtmlAwareMessageMunger()
+ hamm.feed(entry.msgid)
+ entry.msgstr_plural['0'] = hamm.result()
+ hamm = HtmlAwareMessageMunger()
+ hamm.feed(entry.msgid_plural)
+ entry.msgstr_plural['1'] = hamm.result()
+ else:
+ hamm = HtmlAwareMessageMunger()
+ hamm.feed(entry.msgid)
+ entry.msgstr = hamm.result()
+
if 'fuzzy' in entry.flags:
entry.flags.remove('fuzzy') # clear the fuzzy flag
count += 1
More information about the open-ils-commits
mailing list