Opened 12 years ago

Closed 12 years ago

#562 closed enhancement (fixed)

Don't lower()/upper() locales all the time.

Reported by: spaetz Owned by: spaetz
Priority: minor Milestone: 0.3.2
Component: programming Keywords:
Cc: Parent Tickets:

Description

We will store available (=translated) locales in the form "es_CR". The function
get_locale_from_request(request) in tools/translate.py will find the best_match() best on what the webbrowser wants and what we can offer. It will return one of the AVAILABLE_LOCALES items (which we know will be of the form "lc_UP", to there is no need to invoke "locale_to_lower_upper" on every return value. Only invoke that when we parse user input (through the GET/POST parameters to normalize their input).

This is probably not costing too much, but it's one more function that is needlessly called for every request we make.

Change History (1)

comment:1 by spaetz, 12 years ago

Milestone: 0.3.2
Resolution: fixed
Status: newclosed

this has been fixed today

Note: See TracTickets for help on using tickets.