[Product-Developers] Re: i18ndude + MessageFactory + domains
Hanno Schlichting
plone at hannosch.info
Thu Jan 10 11:26:27 UTC 2008
Emmanuel Coirier wrote:
> To be short, i18ndude seems not to work with domains of MessageFactory, or
> it seems that I don't use i18ndude the way it likes. Here is the detailed
> problem:
[...]
> The problem is that my "label_message" msgid is placed by i18ndude in the
> plone.pot, not in the plopDomain.pot, and therefore will not be seen for
> the translation mechanism.
>
> Any clue ?
This is odd. The Python extractor has the limitation of not being able
to get the domain from Message objects, as it doesn't load the Python
files but parses their Python internal abstract syntax tree. The
definition of the domain just isn't part of the individual file, so it
cannot be extracted by the current approach.
What it should do nonetheless is to place all _('messages') found in any
Python file into the domain i18ndude was called with. So if you run
i18ndude for the top folder of your package for both domains you should
get those messages in both pot files.
As long as you only have Messages in your domain in Python files, you
can then use i18ndude's `filter` command to remove all messages from the
plone pot file which are also in the pot file for your domain.
Hanno
More information about the Product-Developers
mailing list