From 059c54471d9a4d943c525821760f4321ad6f70e8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 11 Mar 2007 22:26:31 +0000 Subject: [PATCH] =?utf8?q?Agregar=20funci=C3=B3n=20tg.strbool()=20a=20KID?= =?utf8?q?=20para=20imprimir=20booleanos=20en=20castellano.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sercom/controllers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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) #}}} -- 2.43.0