[Zope3-checkins] SVN: Zope3/trunk/src/zope/ Internationalized apidoc modules description.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Sep 2 07:11:50 EDT 2004


On Thursday 02 September 2004 03:59, Dmitry Vasiliev wrote:
> Modified: Zope3/trunk/src/zope/i18n/__init__.py
> ===================================================================
> --- Zope3/trunk/src/zope/i18n/__init__.py       2004-09-02 07:05:38 UTC
> (rev 27409) +++ Zope3/trunk/src/zope/i18n/__init__.py       2004-09-02
> 07:59:06 UTC (rev 27410) @@ -17,6 +17,7 @@
>  """
>  import re
>  import warnings
> +from zope.security.proxy import isinstance, removeSecurityProxy
>  from zope.component import queryUtility
>  from zope.i18nmessageid import MessageIDFactory, MessageID
>  from zope.i18n.interfaces import ITranslationDomain
> @@ -33,6 +34,7 @@
>  def _translate(msgid, domain=None, mapping=None, context=None,
>                 target_language=None, default=None):
>  
> +    msgid = removeSecurityProxy(msgid)
>  
>      if isinstance(msgid, MessageID):
>          domain = msgid.domain

Dimitry,

this is unacceptable, since it creates a dependence of zope.security in 
zope.i18n. Since this problem occurred only as you internationalized API doc, 
we should be able to quickly determine the place where we should call the 
removeSecurityProxy() call.

Regards,
Stephan

-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-Checkins mailing list