Opened 12 years ago
Closed 12 years ago
#10882 closed enhancement (duplicate)
Add support for Babel 1.0dev
Reported by: | Christian Boos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | i18n | Version: | 1.1.1dev |
Severity: | normal | Keywords: | babel10 |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Currently, it seems that using Babel 1.0dev (bl:source:trunk) is problematic, as we get the following:
AttributeError: NullTranslationsBabel instance has no attribute 'isactive'
as soon as we try to access any translation and there's no message catalog for the currently selected locale.
Full traceback:
2012-10-01 14:52:30,870 Trac[main] DEBUG: Negotiated locale: None -> pl 2012-10-01 14:52:30,870 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/web/main.py", line 179, in dispatch chosen_handler) File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/web/main.py", line 325, in _pre_process_request chosen_handler = filter_.pre_process_request(req, chosen_handler) File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/versioncontrol/api.py", line 340, in pre_process_request if is_default(reponame): File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/versioncontrol/api.py", line 34, in is_default return not reponame or reponame in ('(default)', _('(default)')) File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/util/translation.py", line 195, in gettext if not self.isactive: File "/usr/local/virtualenv/1.1+testing/lib/python2.6/site-packages/Trac-1.1.1dev_r11321-py2.6.egg/trac/util/translation.py", line 190, in __getattr__ return getattr(self.active, name) AttributeError: NullTranslationsBabel instance has no attribute 'isactive'
Attachments (0)
Change History (6)
comment:1 by , 12 years ago
follow-up: 5 comment:3 by , 12 years ago
Could you please test the fix proposed in #10903? If that works, that would be an extra motivation for applying and closing both tickets ;-)
comment:4 by , 12 years ago
The same issue happens on Trac 0.12-stable with Babel trunk if vi
locale.
I've posted the proposal patch on comment:5:ticket:10903. I verified the fix on Trac 1.0-stable and 0.12-stable with Babel trunk and 0.9.6.
comment:5 by , 12 years ago
Replying to cboos:
Could you please test the fix proposed in #10903? If that works, that would be an extra motivation for applying and closing both tickets ;-)
Sure, I'll test on our Trac instance (http://trac.i-mscp.net). I'll report my feedback ASAP.
comment:6 by , 12 years ago
Milestone: | next-dev-1.1.x |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Hello ;
We are getting same error with trac 1.0 and Babel (last trunk). Please, can you fix it ASAP ? For now, We have disabled translation feature by removing babel but it's really annoying…