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

     
    3232            orig = req.args.get('page', 'WikiStart')
    3333            # set altered page name
    3434            page = self._decide_page(req)
     35            name, lang = self._split_lang(page)
     36            req.args['page_name'] = name
     37            req.args['page_langsuffix'] = lang
    3538            if page != orig:
    3639                req.args['page'] = page
    3740                self.env.log.debug('Negotiated: %s' % page)
     
    3942                # page is selected.
    4043                # TODO: I don't know we should set default language
    4144                #       for base page.
    42                 _, lang = self._split_lang(page)
    4345                req.send_header('Content-Language',
    4446                                lang or self._default_lang)
    4547            # 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)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Shun-ichi Goto.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.