[Zope3-Users] i18nextract.py issue
Hermann Himmelbauer
dusty at qwer.tk
Fri Oct 31 03:08:40 EDT 2008
Am Donnerstag 30 Oktober 2008 15:39:03 schrieb hass:
> Hi,
>
> I have been struggling to extract messageIDs out of my application and
> list save them into a .POT file.
> I only know that this used to be a relatively straightforward process
> untill 3.2 when zope was installed from the source code but what about now?
Yep, I was also stunned when switching from the tar.gz to the buildout
process. What I personally did, was to create the following parts in my
buildout.cfg (my product is called "zbsp"):
---------------
[i18nzbsp]
recipe = lovely.recipe:i18n
eggs = bsp
pysqlite==2.4.1
sqlalchemy==0.4.7
sdecstr
sa_tools
ibanlib
zbsp
pybktools
package = zbsp
domain = zbsp
location = ..
output = locales
--------------
Don't forget to add your eggs and reference the i18n-section in the [parts]
section!
Then, I created in my package src directory a subdir called "locale", which
contains the file "update_locales.sh" with the following contents:
---------------
#!/bin/sh
# Message Catalog Template extrahieren
i18nzbspextract
# Copy for english
msgfmt zbsp.pot -o en/LC_MESSAGES/zbsp.mo
# Merge for other languages
cp de/LC_MESSAGES/zbsp.po de/LC_MESSAGES/zbsp.po.backup
msgmerge -U de/LC_MESSAGES/zbsp.po zbsp.pot
---------------
Extraction works well this way, with the minor issue that the "i18n_domain"
attribute in the ZCML-configure element is ignored, instead all message-ids
are extracted from ZCML files.
Best Regards,
Hermann
--
hermann at qwer.tk
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
More information about the Zope3-users
mailing list