Changeset 8024
- Timestamp:
- 3 Apr 2012, 07:37:37 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt
r7811 r8024 1 1 <div i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python: not len(context.keys())"> 2 There no subobjects registered yet.2 There are no subobjects registered yet. 3 3 </div> 4 4 -
main/waeup.kofa/trunk/src/waeup/kofa/locales/de/LC_MESSAGES/zope.po
r8023 r8024 2 2 msgstr "" 3 3 "Project-Id-Version: WAeUP.KOFA\n" 4 "PO-Revision-Date: 2012-04-03 0 7:03+0100\n"4 "PO-Revision-Date: 2012-04-03 09:28+0100\n" 5 5 "Last-Translator: Henrik Bettermann <henrik@waeup.org>\n" 6 6 "Language-Team: WAeUP Germany <henrik@waeup.org>\n" … … 39 39 msgstr "--" 40 40 41 #. Default: "(no value available)" 42 #: src/zope/app/form/browser/sequencewidget.py:256 43 msgid "sequence-value-not-provided" 44 msgstr "--" 45 46 #. Default: "(no values)" 47 #: src/zope/app/form/browser/sequencewidget.py:259 48 msgid "sequence-value-is-empty" 49 msgstr "--" 50 -
main/waeup.kofa/trunk/src/waeup/kofa/locales/en/LC_MESSAGES/zope.po
r8023 r8024 2 2 msgstr "" 3 3 "Project-Id-Version: WAeUP.KOFA\n" 4 "PO-Revision-Date: 2012-04-03 0 7:02+0100\n"4 "PO-Revision-Date: 2012-04-03 08:19+0100\n" 5 5 "Last-Translator: Henrik Bettermann <henrik@waeup.org>\n" 6 6 "Language-Team: WAeUP Germany <henrik@waeup.org>\n" … … 39 39 msgstr "--" 40 40 41 #. Default: "(no value available)" 42 #: src/zope/app/form/browser/sequencewidget.py:256 43 msgid "sequence-value-not-provided" 44 msgstr "--" 45 46 #. Default: "(no values)" 47 #: src/zope/app/form/browser/sequencewidget.py:259 48 msgid "sequence-value-is-empty" 49 msgstr "--" 50 -
main/waeup.kofa/trunk/src/waeup/kofa/locales/zope.pot
r8023 r8024 37 37 msgid "vocabulary-missing-multiple-value-for-edit" 38 38 msgstr "" 39 40 #. Default: "(no value available)" 41 #: src/zope/app/form/browser/sequencewidget.py:256 42 msgid "sequence-value-not-provided" 43 msgstr "" 44 45 #. Default: "(no values)" 46 #: src/zope/app/form/browser/sequencewidget.py:259 47 msgid "sequence-value-is-empty" 48 msgstr "" -
main/waeup.kofa/trunk/src/waeup/kofa/widgets/sequencewidget.py
r7819 r8024 22 22 """ 23 23 import grok 24 from zope.i18n import translate 24 25 from zope.browserpage import ViewPageTemplateFile 25 26 from zope.formlib.interfaces import IInputWidget, IDisplayWidget … … 47 48 itemTag = 'div' 48 49 50 def __call__(self): 51 """This is is a patch for the orginal __call__ method which doesn't call 52 the translate function properly. 53 """ 54 55 # get the data to display: 56 if self._renderedValueSet(): 57 data = self._data 58 else: 59 data = self.context.get(self.context.context) 60 61 # deal with special cases: 62 if data == self.context.missing_value: 63 return translate(self._missingValueMessage, context=self.request) 64 data = list(data) 65 if not data: 66 return translate(self._emptySequenceMessage, context=self.request) 67 68 parts = [] 69 for i, item in enumerate(data): 70 widget = self._getWidget(i) 71 widget.setRenderedValue(item) 72 s = widget() 73 if self.itemTag: 74 s = "<%s>%s</%s>" % (self.itemTag, s, self.itemTag) 75 parts.append(s) 76 contents = "\n".join(parts) 77 if self.tag: 78 contents = "\n%s\n" % contents 79 contents = renderElement(self.tag, 80 cssClass=self.cssClass, 81 extra=self.extra, 82 contents=contents) 83 return contents 84 49 85 # Register our sequence widgets as default for lists. 50 86 @grok.adapter(IList, IField, IBrowserRequest)
Note: See TracChangeset for help on using the changeset viewer.