diff --git a/browser/common.py b/browser/common.py index b1985bb..dd8a2e5 100644 --- a/browser/common.py +++ b/browser/common.py @@ -25,6 +25,7 @@ $Id$ from zope.app import zapi from zope import component from zope.app.form.browser.interfaces import ITerms +from zope.app.i18n.interfaces import ITranslationDomain from zope.app.security.interfaces import IAuthentication from zope.app.pagetemplate import ViewPageTemplateFile from zope.cachedescriptors.property import Lazy @@ -300,12 +301,17 @@ class BaseView(GenericView): if versionable is None: return '' versionId = versionable.versionId - current = (versionable.currentVersion == context) and 'current' or '' - released = (versionable.releasedVersion == context) and 'released' or '' + td = component.getUtility(ITranslationDomain, _._domain) + current = ((versionable.currentVersion == context) + and td.translate(_(u'current'), context=self.request) + or u'') + released = ((versionable.releasedVersion == context) + and td.translate(_(u'released'), context=self.request) + or u'') if not current and not released: return versionId - addInfo = ', '.join(e for e in (current, released) if e) - return '%s (%s)' % (versionId, addInfo) + addInfo = u', '.join(e for e in (current, released) if e) + return u'%s (%s)' % (versionId, addInfo) # controlling editing diff --git a/browser/form_macros.pt b/browser/form_macros.pt index 28f25a8..1a1a65c 100644 --- a/browser/form_macros.pt +++ b/browser/form_macros.pt @@ -178,11 +178,11 @@ tal:define="versionInfo view/versionInfo" tal:condition="versionInfo"> - Versioning + Versioning - Version: + Version: 1.1 (current, released) - + diff --git a/browser/resource_macros.pt b/browser/resource_macros.pt index 62e19cd..096280a 100644 --- a/browser/resource_macros.pt +++ b/browser/resource_macros.pt @@ -25,10 +25,13 @@ @@ -48,26 +51,30 @@

Title

Description

- - Download - - | + + + Download + + + View - - | + + Open for editing - +

diff --git a/locales/de/LC_MESSAGES/loops.mo b/locales/de/LC_MESSAGES/loops.mo index e6073c4..1eda2ec 100644 Binary files a/locales/de/LC_MESSAGES/loops.mo and b/locales/de/LC_MESSAGES/loops.mo differ diff --git a/locales/de/LC_MESSAGES/loops.po b/locales/de/LC_MESSAGES/loops.po index 4b55877..67dbac5 100644 --- a/locales/de/LC_MESSAGES/loops.po +++ b/locales/de/LC_MESSAGES/loops.po @@ -173,4 +173,25 @@ msgstr "Ansehen" msgid "Concept Assignments" msgstr "Zugeordnete Begriffe" +msgid "more..." +msgstr "Mehr..." + +msgid "Versioning" +msgstr "Versionierung" + +msgid "current" +msgstr "aktuell" + +msgid "released" +msgstr "freigegeben" + +msgid "New version" +msgstr "Neue Version" + +msgid "major" +msgstr "major" + +msgid "minor" +msgstr "minor" +