r13605 - Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple
"Jens W. Klein" <[email protected]> Tue, 03 May 2011 16:37:20 +0000
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jensens
Date: Tue May 3 16:37:19 2011
New Revision: 13605
Modified:
Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py
Log:
also for translated
Modified: Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py
==============================================================================
--- Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py (original)
+++ Products.ATVocabularyManager/branches/1.5/Products/ATVocabularyManager/types/simple/term.py Tue May 3 16:37:19 2011
@@ -80,10 +80,11 @@
if not lang is None:
# if we ask for a specific language, we try to
# provide it
- trans = self.getTranslation(lang)
+ obj = self.getTranslation(lang) or self
# if not found, we return the title of the current term
- return trans and trans.Title() or self.Title()
- return self.Title().decode('utf8')
+ else:
+ obj = self
+ return obj.Title().decode('utf8')
def getTermKeyPath(self):
# terms of flat vocabularies can savely return their key
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd