Re: plone domain translations in add-ons for Plone 3 and 4
Maurits van Rees <m.van.rees-1kr/[email protected]> Fri, 18 Nov 2011 19:33:56 +0100
| Newsgroups | gmane.comp.web.zope.plone.internationalization |
|---|---|
| Organization | Zest Software |
| Message-ID | <[email protected]> |
Op 18-11-11 15:22, Vincent Fretin schreef:
> Hi,
>
> I thought that translations in i18n folder worked on both Plone 3 and 4,
> is it not the case?
> In Plone 4, the po files in the the i18n directory are loaded with the
> same engine as po files in the locales folder, right?
> It should merge translations if there is several po files with the same
> domain. If not, I think it's a bug.
An i18n directory still works in Plone 4. But when one or more locales
directories have been registered for a domain, any po files for that
domain in an i18n directory are ignored.
Oh wait, I may have fooled myself. Translations for the plone domain in
an i18n directory *are* picked up when the package is in the Products
namespace.
Hm, the same *should* probably be true for packages in a different
namespace as long as you register the package in zcml:
<five:registerPackage package="." />
But that is not the case. Seems a bug indeed. I will see if I can find
out where the problem is.
To test:
- Make a checkout of this package, where I also did the change I
described in my initial mail:
https://svn.plone.org/svn/collective/collective.portlet.relateditems/trunk
- Run the bootstrap and bin/buildout.
- Comment out these lines in configure.zcml:
<i18n:registerTranslations
directory="plonelocales"
zcml:condition="have plone-4" />
- Create a *Dutch* Plone Site, install the package.
- Optionally create French translations and try it with those and commit
them. :-)
- Go to @@manage-portlets and see that there is a 'Related Items' portlet.
- Revert the zcml change and restart Plone.
- Now @@manage-portlets shows 'Gerelateerde items'.
A fresh release of this package is welcome btw, in case any authors are
following this list. I have sent a mail as well to kiorky.
Cheers,
--
Maurits van Rees http://maurits.vanrees.org/
Web App Programmer at Zest Software: http://zestsoftware.nl
"Logical thinking shows conclusively that logical thinking
is inconclusive." - My summary of Gödel, Escher, Bach
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d