[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/component. New translation slots added

Dmitry Vasiliev dima at hlabs.spb.ru
Mon Mar 21 07:30:48 EST 2005


Log message for revision 29611:
  New translation slots added
  

Changed:
  U   Zope3/trunk/src/zope/app/apidoc/component.py
  U   Zope3/trunk/src/zope/app/apidoc/component.txt

-=-
Modified: Zope3/trunk/src/zope/app/apidoc/component.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/component.py	2005-03-21 11:02:18 UTC (rev 29610)
+++ Zope3/trunk/src/zope/app/apidoc/component.py	2005-03-21 12:30:48 UTC (rev 29611)
@@ -13,7 +13,7 @@
 ##############################################################################
 """Component Inspection Utilities
 
-$Id: browser.py 29199 2005-02-17 22:38:55Z srichter $
+$Id$
 """
 __docformat__ = 'restructuredtext'
 import types
@@ -25,6 +25,7 @@
 from zope.publisher.interfaces import IRequest
 
 from zope.app import zapi
+from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.apidoc.utilities import getPythonPath, relativizePath
 from zope.app.apidoc.utilities import renderText
 from zope.app.apidoc.classregistry import classRegistry
@@ -177,7 +178,7 @@
         'required': [getInterfaceInfoDictionary(iface)
                      for iface in reg.required
                      if iface is not None],
-        'name': getattr(reg, 'name', '<subscription>'),
+        'name': getattr(reg, 'name', _('<subscription>')),
         'factory': path,
         'factory_url': url,
         'doc': doc,
@@ -198,7 +199,7 @@
 
     path = getPythonPath(callable)
 
-    return {'name': reg.name or '<i>no name</i>',
+    return {'name': reg.name or _('<i>no name</i>'),
             'title': getattr(factory, 'title', u''),
             'description': renderText(getattr(factory, 'description', u''),
                                       module=callable.__module__),
@@ -213,7 +214,7 @@
         klass = reg.component.__class__
 
     path = getPythonPath(klass)
-    return {'name': reg.name or '<i>no name</i>',
+    return {'name': reg.name or _('<i>no name</i>'),
             'url_name': reg.name or '__noname__',
             'path': path,
             'url': path.replace('.', '/')}

Modified: Zope3/trunk/src/zope/app/apidoc/component.txt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/component.txt	2005-03-21 11:02:18 UTC (rev 29610)
+++ Zope3/trunk/src/zope/app/apidoc/component.txt	2005-03-21 12:30:48 UTC (rev 29611)
@@ -260,7 +260,7 @@
   {'doc': 'doc info',
    'factory': '__builtin__.MyResult',
    'factory_url': '__builtin__/MyResult',
-   'name': '<subscription>',
+   'name': u'<subscription>',
    'provided': None,
    'required': [{'module': '__builtin__', 'name': 'IFoo'},
                 {'module': '__builtin__', 'name': 'IBar'}],
@@ -295,7 +295,7 @@
 
   >>> pprint(component.getUtilityInfoDictionary(
   ...     component.getUtilities(IFooBar).next()))
-  {'name': '<i>no name</i>',
+  {'name': u'<i>no name</i>',
    'path': '__builtin__.MyFooBar',
    'url': '__builtin__/MyFooBar',
-   'url_name': '__noname__'}
\ No newline at end of file
+   'url_name': '__noname__'}



More information about the Zope3-Checkins mailing list