--- a/ztfy/utils/security.py Fri Feb 03 17:50:17 2012 +0100
+++ b/ztfy/utils/security.py Fri Feb 03 18:03:58 2012 +0100
@@ -28,10 +28,14 @@
from zc.set import Set
from zope.component import getUtility
from zope.deprecation.deprecation import deprecate
+from zope.i18n import translate
from zope.interface import implements
from zope.security.proxy import removeSecurityProxy
# import local packages
+from ztfy.utils.request import getRequest
+
+from ztfy.utils import _
def unproxied(value):
@@ -60,14 +64,15 @@
def __init__(self, id):
self.id = id
+ self.request = getRequest()
@property
def title(self):
- return _("< missing principal %s >") % self.id
+ return translate(_("< missing principal %s >"), context=self.request) % self.id
@property
def description(self):
- return _("This principal can't be found in any authentication utility...")
+ return translate(_("This principal can't be found in any authentication utility..."), context=self.request)
@deprecate("ztfy.utils.security.getPrincipal is deprecated. Use ztfy.security.search.getPrincipal function instead.")