def get_disclaimer_text(self):
"""
returns the correct translation for our disclaimer blurb
the master object is the german version, we expect this to always be there
the text is in the "text" IRichText field
20190520 superseded in new templates
by more generic version get_raw_snippet_text('snippet_id')
"""
portal = getSite() # returns portal root from thread local storage
disclaimer_obj = portal.restrictedTraverse('de/toolbox/text-bausteine/mdb-footer-haftungsausschluss')
language = ILanguage(self.context).get_language()
translated_obj = ITranslationManager(disclaimer_obj).get_translation(language)
field = 'text'
if translated_obj:
return getattr(translated_obj,field).raw
#return the original
else:
return getattr(disclaimer_obj,field).raw