X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/a146bf18e42d925d1c76f6cfd9d5d35225e41110..cf586089fbdeac2706a4e986f290f874b33093a8:/sercom/controllers.py?ds=sidebyside diff --git a/sercom/controllers.py b/sercom/controllers.py index 8930478..3bd0d8a 100644 --- a/sercom/controllers.py +++ b/sercom/controllers.py @@ -164,8 +164,13 @@ def summarize(text, size, concat=True, continuation='...'): text = text[:size-len(continuation)] + continuation return text +def strbool(bool): + if bool: + return _(u'Sí') + return _(u'No') + def add_custom_stdvars(vars): - return vars.update(dict(summarize=summarize)) + return vars.update(dict(summarize=summarize, strbool=strbool)) view.variable_providers.append(add_custom_stdvars) #}}}