Message2772
Given that roundup has now many translations
available, I thought that it would be nice to make
Roundup's web frontend checks the user browser
language on-the-fly and displays the appropiate
messages.
I'm including here one patch and a new file.
The new file is accept_language.py. It parses the
content of the language header sent by the browser and
builds a list of language codes ordered by the user
language preference suitable for gettext & co. I
copied the file under roundup's cgi directory. It
follows the spec at
http://www.w3.org/Protocols/rfc2616/rfc2616-
sec14.html#sec14.4 (I hope!)
It uses a PriorityQueue to order by quality value. I
may change that to python's heapq given that Roundup
is requires python2.3 now.
The patch is for client.py. It traps the 'Accept-
Language' request header and makes the tranlation
object. It's minimal but it works. I think that more
discussion and knowledge on roundup's cgi internals is
needed before it gets into trunk.
|
|
Date |
User |
Action |
Args |
2009-02-03 14:23:04 | admin | link | issue1360321 messages |
2009-02-03 14:23:04 | admin | create | |
|