Modify ↓
Opened 17 years ago
#1756 new enhancement
[patch] export page/lang suffix variables to other plugins
Reported by: | phpxcache | Owned by: | Shun-ichi Goto |
---|---|---|---|
Priority: | normal | Component: | TracWikiNegotiatorPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
-
wikinegotiator/negotiator.py
32 32 orig = req.args.get('page', 'WikiStart') 33 33 # set altered page name 34 34 page = self._decide_page(req) 35 name, lang = self._split_lang(page) 36 req.args['page_name'] = name 37 req.args['page_langsuffix'] = lang 35 38 if page != orig: 36 39 req.args['page'] = page 37 40 self.env.log.debug('Negotiated: %s' % page) … … 39 42 # page is selected. 40 43 # TODO: I don't know we should set default language 41 44 # for base page. 42 _, lang = self._split_lang(page)43 45 req.send_header('Content-Language', 44 46 lang or self._default_lang) 45 47 # always send Vary header to tell language negitiation is
it would be nice if we can export to other plugins that may want to use is. tracnav is one of those.
Attachments (0)
Note: See
TracTickets for help on using
tickets.