Ticket #7450 (closed defect: worksforme)
localized trac doesn't translate with mod_wsgi
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | web frontend | Version: | |
| Severity: | major | Keywords: | |
| Cc: |
Description
If I start it up as standalone it works, I can see the default page accept my native language (probably through accept-language header) and while logged in there is a preference page which works too.
But if I try it via wsgi it doesn't work. Probably babel doesn't load when using the wsgi script instead of standalone.py . No prefpane, no defaultlanguage, even the info saved before with the working copy has no effect, still everything on english.
my wsgi script:
import os os.environ['TRAC_ENV_PARENT_DIR'] = '/usr/local/trac/var' os.environ['PYTHON_EGG_CACHE'] = '/usr/local/trac/cache' os.environ['HGENCODING'] = 'utf-8' import sys sys.path.append('/usr/local/trac/lib/python2.4/site-packages') from pkg_resources import require require("Trac==0.12multirepos-r7260") import trac.web.main application = trac.web.main.dispatch_request
Here my Sysinfo:
- Trac: 0.12multirepos-r7260
- Python: 2.4.4 (#1, Apr 15 2008, 23:37:53) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
- setuptools: 0.6c3
- SQLite: 3.3.8
- pysqlite: 2.3.2
- Genshi: 0.5
- Mercurial: 1.0.1
- jQuery: 1.2.3
And plugin info (everything is checked):
- Trac 0.12multirepos-r7260
- TracMercurial 0.12.0.3dev
- TracXMLRPC 1.0.0
Additional Info:
- Apache/2.2.3 with mod_wsgi 2.1


