Re: plone domain translations in add-ons for Plone 3 and 4

Maurits van Rees <m.van.rees-1kr/[email protected]> Sat, 19 Nov 2011 00:07:31 +0100
Newsgroups gmane.comp.web.zope.plone.internationalization
Organization Zest Software
Message-ID <[email protected]>
Op 18-11-11 23:49, Vincent Fretin schreef:
> On Fri, Nov 18, 2011 at 11:39 PM, Vincent Fretin
> <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Ah! You're right, there is an issue here. Some translations in the
>     plone domain in the i18n folder of plone.app.discussion doesn't show
>     up in Plone 4.2, like the Commentators criteria and its description. :(
>
>
> The translations do show up with plone.app.discussion 1.0b12 with Plone
> 4.0.9. The package does have <five:registerPackage package="." /> and
> the header of the po file didn't change. In Plone 4.1, it doesn't work.

Bingo.  Products/CMFQuickInstallerTool/utils.py has the necessary code 
that should be used in PlacelessTranslationService too:

try:
     # Zope 2.13+
     from OFS.metaconfigure import get_registered_packages
except ImportError:
     def get_registered_packages():
         import Products
         return getattr(Products, '_registered_packages', ())

The old code is still used in the spot in PTS that wants to look for 
i18n directories in packages that have five:registerPackage.

I will make the change.


-- 
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