Locale error and unable to create ticket on the trac site

19 views
Skip to first unread message

Alex Samorukov

unread,
Mar 27, 2024, 11:22:21 AMMar 27
to Trac Users
Hi everyone,

I have 2 reports. 

1. It seems that something is broken with a new ticket form on the trac website. Page https://trac.edgewall.org/wiki/NewTicket does not have any inputfields at all, so i am nopt able to report the problem.

2. Problem itself - trac is broken with zh_TW locale. How to validate:

- switch locale to zh_TW.
- try to create new ticket. Error would occur

Error is not related to the locale itself, but to the get_time_format_jquery_ui() function. 

This is a trace:

Internal Server Error: <RequestWithSession "GET '/newticket'">, referrer 'https://www.smartmontools.org/admin/general/logging' Traceback (most recent call last):   File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 609, in dispatch_request    
dispatcher.dispatch(req)   File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 301, in dispatch    
raise e   File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 247, in dispatch    
resp = chosen_handler.process_request(req)   File "/usr/local/lib/python3.9/site-packages/trac/ticket/web_ui.py",
line 162, in process_request     return self._process_newticket_request(req)  
File "/usr/local/lib/python3.9/site-packages/trac/ticket/web_ui.py", line 547, in _process_newticket_request     chrome.add_jquery_ui(req)  
File "/usr/local/lib/python3.9/site-packages/trac/web/chrome.py", line 1135, in add_jquery_ui     'time_format': get_time_format_jquery_ui(req.lc_time),  
File "/usr/local/lib/python3.9/site-packages/trac/util/datefmt.py", line 450, in get_time_format_jquery_ui     return f % values KeyError: 'B'

RjOllos

unread,
Mar 27, 2024, 3:52:50 PMMar 27
to Trac Users
On Wednesday, March 27, 2024 at 8:22:21 AM UTC-7 sammn...@gmail.com wrote:
Hi everyone,

I have 2 reports. 

1. It seems that something is broken with a new ticket form on the trac website. Page https://trac.edgewall.org/wiki/NewTicket does not have any inputfields at all, so i am nopt able to report the problem.

That page has links that will take you to the ticket form. The text is guidance on when/how to create a ticket.

Jun Omae

unread,
Mar 29, 2024, 1:46:53 AMMar 29
to trac-...@googlegroups.com
Hi,

On Thu, Mar 28, 2024 at 12:22 AM Alex Samorukov <sammn...@gmail.com> wrote:
> 2. Problem itself - trac is broken with zh_TW locale. How to validate:
>
> - switch locale to zh_TW.
> - try to create new ticket. Error would occur
>
> Error is not related to the locale itself, but to the get_time_format_jquery_ui() function.
>
> This is a trace:
>
> Internal Server Error: <RequestWithSession "GET '/newticket'">, referrer 'https://www.smartmontools.org/admin/general/logging' Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 609, in dispatch_request
> dispatcher.dispatch(req) File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 301, in dispatch
> raise e File "/usr/local/lib/python3.9/site-packages/trac/web/main.py", line 247, in dispatch
> resp = chosen_handler.process_request(req) File "/usr/local/lib/python3.9/site-packages/trac/ticket/web_ui.py",
> line 162, in process_request return self._process_newticket_request(req)
> File "/usr/local/lib/python3.9/site-packages/trac/ticket/web_ui.py", line 547, in _process_newticket_request chrome.add_jquery_ui(req)
> File "/usr/local/lib/python3.9/site-packages/trac/web/chrome.py", line 1135, in add_jquery_ui 'time_format': get_time_format_jquery_ui(req.lc_time),
> File "/usr/local/lib/python3.9/site-packages/trac/util/datefmt.py", line 450, in get_time_format_jquery_ui return f % values KeyError: 'B'

I just added comment of #13482 about your report in
https://trac.edgewall.org/ticket/13482#comment:9.

Also, workaround is to downgrade Babel to 2.9.1.

--
Jun Omae <jun...@gmail.com> (大前 潤)
Reply all
Reply to author
Forward
0 new messages