internationalizationzopezope3zcml

Change i18n_domain for Products.Five registered pages


It seems that one template from Products.Five (manage_interfaces) has a bad i18n markup, making interfaces name translatable. i18n domain is not defined, therefore the global one is used.

I want to change the i18n domain for that page, but I don't know how to do that from my packages. The page is registered using browser:page Five directive

<browser:page
    for="*"
    name="manage_interfaces"
    template="manage_interfaces.pt"
    class="Products.Five.utilities.browser.marker.EditView"
    permission="zope2.ManageProperties"
    />

I tried http://www.mesimian.com/zope-changing-i18n-domain-for-any-view/ but that doesn't work.


Solution

  • First of all, file a bug report; the upstream developers would probably like to know about this.

    Use z3c.jbot to override the template in your own package. Create a templates subdirectory, register it and put a file named Products.Five.utilities.browser.manage_interfaces.pt in that subdirectory. That file will be used to replace the original template.

    Registration of the directory with z3c.jbot is simple, read the instructions on the PyPI page.