[Zope3-checkins]
SVN: Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/
More i18n for the interface details screen
Dmitry Vasiliev
dima at hlabs.spb.ru
Tue Dec 20 08:42:42 EST 2005
Log message for revision 40900:
More i18n for the interface details screen
Changed:
U Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/browser.py
U Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/iface_macros.pt
U Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/index.pt
-=-
Modified: Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/browser.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/browser.py 2005-12-20 13:21:29 UTC (rev 40899)
+++ Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/browser.py 2005-12-20 13:42:41 UTC (rev 40900)
@@ -15,7 +15,9 @@
$Id$
"""
+
__docformat__ = 'restructuredtext'
+
import inspect
from zope.interface import Interface
@@ -29,6 +31,7 @@
from zope.proxy import removeAllProxies
from zope.app import zapi
+from zope.app.i18n import ZopeMessageFactory as _
from zope.app.publisher.browser import BrowserView
from zope.app.apidoc.utilities import getPythonPath, renderText
@@ -36,6 +39,7 @@
from zope.app.apidoc import classregistry
from zope.app.apidoc import interface, component, presentation
+
def findAPIDocumentationRoot(obj, request):
if zapi.isinstance(obj, APIDocumentation):
return zapi.absoluteURL(obj, request)
@@ -257,3 +261,19 @@
for reg in regs]
infos.sort()
setattr(self, level+type_map[type]+'Views', infos)
+
+ def getViewClassTitles(self):
+ return {
+ "specific": _("Specific views"),
+ "extended": _("Extended views"),
+ "generic": _("Generic views"),
+ }
+
+ def getViewTypeTitles(self):
+ return {
+ "browser": _("Browser"),
+ "xmlrpc": _("XML-RPC"),
+ "http": _("HTTP"),
+ "ftp": _("FTP"),
+ "other": _("Other"),
+ }
Modified: Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/iface_macros.pt
===================================================================
--- Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/iface_macros.pt 2005-12-20 13:21:29 UTC (rev 40899)
+++ Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/iface_macros.pt 2005-12-20 13:42:41 UTC (rev 40900)
@@ -105,8 +105,7 @@
<h4>
<metal:block use-macro="context/@@apidoc_macros/displaySwitch" />
- <span i18n:translate=""><span i18n:name="name" tal:replace="name"
- /> Views</span>
+ <span i18n:translate="" tal:content="title">View title</span>
</h4>
<metal:block use-macro="context/@@apidoc_macros/display" >
<div metal:fill-slot="content">
@@ -123,25 +122,29 @@
<h3 class="details-section">
<metal:block use-macro="context/@@apidoc_macros/displaySwitch" />
- <span i18n:translate="" tal:content="type">Browser</span>
+ <span i18n:translate="" tal:content="title">Browser</span>
</h3>
<metal:block use-macro="context/@@apidoc_macros/display" >
- <div class="indent" metal:fill-slot="content">
+ <div class="indent" metal:fill-slot="content"
+ tal:define="titles view/getViewClassTitles">
<tal:block define="Views specific_views;
name string:Specific;
+ title titles/specific;
show show_specific">
<metal:block use-macro="context/@@interface_macros/viewcategory" />
</tal:block>
<tal:block define="Views extended_views;
name string:Extended;
+ title titles/extended;
show show_extended">
<metal:block use-macro="context/@@interface_macros/viewcategory" />
</tal:block>
<tal:block define="Views generic_views;
name string:Generic;
+ title titles/generic;
show show_generic">
<metal:block use-macro="context/@@interface_macros/viewcategory" />
</tal:block>
Modified: Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/index.pt
===================================================================
--- Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/index.pt 2005-12-20 13:21:29 UTC (rev 40899)
+++ Zope3/branches/3.2/src/zope/app/apidoc/ifacemodule/index.pt 2005-12-20 13:42:41 UTC (rev 40900)
@@ -167,10 +167,12 @@
<h2 class="details-section" i18n:translate="">Views</h2>
- <div class="indent">
+ <div class="indent"
+ tal:define="titles view/getViewTypeTitles">
<tal:block define="
type string:Browser;
+ title titles/browser;
specific_views view/specificBrowserViews;
extended_views view/extendedBrowserViews;
generic_views view/genericBrowserViews;
@@ -190,6 +192,7 @@
<tal:block define="
type string:XML-RPC;
+ title titles/xmlrpc;
specific_views view/specificXMLRPCViews;
extended_views view/extendedXMLRPCViews;
generic_views view/genericXMLRPCViews;
@@ -209,6 +212,7 @@
<tal:block define="
type string:HTTP;
+ title titles/http;
specific_views view/specificHTTPViews;
extended_views view/extendedHTTPViews;
generic_views view/genericHTTPViews;
@@ -228,6 +232,7 @@
<tal:block define="
type string:FTP;
+ title titles/ftp;
specific_views view/specificFTPViews;
extended_views view/extendedFTPViews;
generic_views view/genericFTPViews;
@@ -247,6 +252,7 @@
<tal:block define="
type string:Other;
+ title titles/other;
specific_views view/specificOtherViews;
extended_views view/extendedOtherViews;
generic_views view/genericOtherViews;
More information about the Zope3-Checkins
mailing list