From c1a3a4c03e6bee78e26c269796ea623026fed512 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Thu, 12 Jul 2001 13:44:20 +0000 Subject: add_error_message(): Don't translate tag if it is the empty string. Found by Juan Carlos Rey Anaya. --- Mailman/Cgi/options.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Mailman/Cgi/options.py') diff --git a/Mailman/Cgi/options.py b/Mailman/Cgi/options.py index 849f261ba..3aa2ac623 100644 --- a/Mailman/Cgi/options.py +++ b/Mailman/Cgi/options.py @@ -587,8 +587,11 @@ def loginpage(mlist, doc, user, cgidata): def add_error_message(doc, errmsg, tag='Error: ', *args): + # Don't translate the tag if it's the empty string + if tag: + tag = _(tag) doc.AddItem(Header(3, Bold(FontAttr( - _(tag), color=mm_cfg.WEB_ERROR_COLOR, size="+2")).Format() + + tag, color=mm_cfg.WEB_ERROR_COLOR, size="+2")).Format() + Italic(errmsg % args).Format())) -- cgit v1.2.3-70-g09d2