Mercurial > p > roundup > code
comparison roundup/cgi/cgitb.py @ 2426:cafdf8b7cc69
use templating translation service instead of commandline-oriented gettext()
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Wed, 09 Jun 2004 09:20:01 +0000 |
| parents | fc52d57c6c3e |
| children | 7500a9bb8bf9 |
comparison
equal
deleted
inserted
replaced
| 2424:74474ec41050 | 2426:cafdf8b7cc69 |
|---|---|
| 1 # | 1 # |
| 2 # This module was written by Ka-Ping Yee, <ping@lfw.org>. | 2 # This module was written by Ka-Ping Yee, <ping@lfw.org>. |
| 3 # | 3 # |
| 4 # $Id: cgitb.py,v 1.10 2004-02-11 23:55:09 richard Exp $ | 4 # $Id: cgitb.py,v 1.11 2004-06-09 09:20:01 a1s Exp $ |
| 5 | 5 |
| 6 """Extended CGI traceback handler by Ka-Ping Yee, <ping@lfw.org>. | 6 """Extended CGI traceback handler by Ka-Ping Yee, <ping@lfw.org>. |
| 7 """ | 7 """ |
| 8 __docformat__ = 'restructuredtext' | 8 __docformat__ = 'restructuredtext' |
| 9 | 9 |
| 10 import sys, os, types, string, keyword, linecache, tokenize, inspect, cgi | 10 import sys, os, types, string, keyword, linecache, tokenize, inspect, cgi |
| 11 import pydoc, traceback | 11 import pydoc, traceback |
| 12 | 12 |
| 13 from roundup.i18n import _ | 13 from roundup.cgi import templating |
| 14 | |
| 15 def _(msgid): | |
| 16 return templating.translationService.gettext(msgid) | |
| 14 | 17 |
| 15 def breaker(): | 18 def breaker(): |
| 16 return ('<body bgcolor="white">' + | 19 return ('<body bgcolor="white">' + |
| 17 '<font color="white" size="-5"> > </font> ' + | 20 '<font color="white" size="-5"> > </font> ' + |
| 18 '</table>' * 5) | 21 '</table>' * 5) |
