Roger Ineichen wrote:
Note, if you run the i18nextract script, all module must be there like in a running application. You can't only use the files which will contain locales. Also modules which this packages import from must be there.
That should not be necessary I think.  At least I am not used to it.
When I use i18ndude for making pot/po files for a Plone product/package and I have "from Products.CMFPlone import something" in a file, then this import does not really take place. I expect in the case of python files it simply looks for lines like:

  _(u"My message to the world.")

Probably it works in some ues case but for sure not in all.
Let's give a sample. If you define a interface like

foo = zope.schema.Choice(

Then the foo.bar package must be available.
That sounds suspiciously like you are trying to import the modules/packages that you want to extract from. I think that is neither necessary nor desirable. The extraction should work on the source code only. For zcml extraction, that might be an issue because knowing which strings to extract requires processing the meta directives included from the file. For python source code and page templates there is no such problem.

Hope this helps,


Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to