[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/security/browser/auth Added new translation slot

Dmitry Vasiliev dima at hlabs.spb.ru
Fri Jun 10 04:54:29 EDT 2005


Log message for revision 30727:
  Added new translation slot
  

Changed:
  U   Zope3/trunk/src/zope/app/security/browser/auth.py
  U   Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt

-=-
Modified: Zope3/trunk/src/zope/app/security/browser/auth.py
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/auth.py	2005-06-09 19:36:18 UTC (rev 30726)
+++ Zope3/trunk/src/zope/app/security/browser/auth.py	2005-06-10 08:54:29 UTC (rev 30727)
@@ -19,17 +19,16 @@
 from zope.interface import implements
 from zope.i18n import translate
 from zope import component
-from zope.app.zapi import getName, getPath
-from zope.app.publisher.interfaces.http import ILogin, ILogout
+from zope.app.publisher.interfaces.http import ILogin
 from zope.app.security.interfaces import IAuthentication
 from zope.app.security.interfaces import IUnauthenticatedPrincipal
 from zope.app.security.interfaces import ILogout, ILogoutSupported
 from zope.app.pagetemplate import ViewPageTemplateFile
-from zope.proxy import removeAllProxies
 from zope.app.i18n import ZopeMessageIDFactory as _
 
 
 search_label = _('search-button', 'Search')
+search_title = _('Search String')
 
 class AuthUtilitySearchView(object):
 
@@ -44,11 +43,11 @@
         html = []
 
         # add sub title for source search field
-        html.append('<h4 i18n:translate="">%s</h4>' % sourcename)
+        html.append('<h4>%s</h4>' % sourcename)
         # start row for search fields
         html.append('<div class="row">')
         html.append('<div class="label">')
-        html.append('Search String')
+        html.append(translate(search_title, context=self.request))
         html.append('</div>')
         html.append('<div class="field">')
         html.append('<input type="text" name="%s" />' %(name+'.searchstring'))

Modified: Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt
===================================================================
--- Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt	2005-06-09 19:36:18 UTC (rev 30726)
+++ Zope3/trunk/src/zope/app/security/browser/authutilitysearchview.txt	2005-06-10 08:54:29 UTC (rev 30727)
@@ -28,7 +28,7 @@
 This allows us to render a search form.
 
   >>> print view.render('test') # doctest: +NORMALIZE_WHITESPACE
-  <h4 i18n:translate="">principals.zcml</h4>
+  <h4>principals.zcml</h4>
   <div class="row">
   <div class="label">
   Search String
@@ -64,4 +64,4 @@
   >>> ids = list(view.results('test'))
   >>> ids.sort()
   >>> ids
-  [0, 1]
\ No newline at end of file
+  [0, 1]



More information about the Zope3-Checkins mailing list