1111# and must be placed in the tracker directory.
1212#
1313# History (most recent first):
14+ # 11-jul-2004 [als] added 'TrackerLanguage' option;
15+ # pass message translator to the tracker client instance
1416# 04-jul-2004 [als] tracker lookup moved from module global to request handler;
1517# use PythonOption TrackerHome (configured in apache)
1618# to open the tracker
1719# 06-may-2004 [als] use cgi.FieldStorage from Python library
1820# instead of mod_python FieldStorage
1921# 29-apr-2004 [als] created
2022
21- __version__ = "$Revision: 1.1 $" [11 :- 2 ]
22- __date__ = "$Date: 2004-07-06 10:25:42 $" [7 :- 2 ]
23+ __version__ = "$Revision: 1.2 $" [11 :- 2 ]
24+ __date__ = "$Date: 2004-07-12 09:14:12 $" [7 :- 2 ]
2325
2426import cgi
2527import os
2628
2729from mod_python import apache
2830
2931import roundup .instance
32+ from roundup .cgi import TranslationService
3033
3134class Headers (dict ):
3235
@@ -72,6 +75,7 @@ def handler(req):
7275 """HTTP request handler"""
7376 _options = req .get_options ()
7477 _home = _options .get ("TrackerHome" )
78+ _lang = _options .get ("TrackerLanguage" )
7579 if not (_home and os .path .isdir (_home )):
7680 apache .log_error (
7781 "PythonOption TrackerHome missing or invalid for %(uri)s"
@@ -88,7 +92,8 @@ def handler(req):
8892 # we just remove the first character ('/')
8993 _env ["PATH_INFO" ] = req .path_info [1 :]
9094 _form = cgi .FieldStorage (req , environ = _env )
91- _client = _tracker .Client (_tracker , Request (req ), _env , _form )
95+ _client = _tracker .Client (_tracker , Request (req ), _env , _form ,
96+ translator = TranslationService .get_translation (_lang ))
9297 _client .main ()
9398 return apache .OK
9499
0 commit comments