Page MenuHomePhabricator

SpecialPage::getTitleFor does not return a localised name
Closed, ResolvedPublic

Description

SpecialPage::getTitleFor is described as "Get a localised Title object for a specified special page name"

At least flaggedRevs uses this function, for example FlaggedRevsPage::submit:

$wgOut->returnToMain( false, SpecialPage::getTitleFor( 'RecentChanges' ) );

Actual output for language 'de':

Zurück zur Seite Spezial:RecentChanges

Expected output for language 'de':

Zurück zur Seite Spezial:Letzte_Änderungen

A mix of English and German is a little bit weird :/


Version: 1.13.x
Severity: normal

Details

Reference
bz14118

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:09 PM
bzimport set Reference to bz14118.

this happens because RecentChanges is *not* a valid special page identifier (they are not case insensitive).
That should be SpecialPage::getTitleFor( 'Recentchanges' ) wich returns the localised name of the page.

(In reply to comment #1)

this happens because RecentChanges is *not* a valid special page identifier
(they are not case insensitive).
That should be SpecialPage::getTitleFor( 'Recentchanges' ) wich returns the
localised name of the page.

Ah, I see. FlaggedRevs fixed with r34850.

But I assume the function should accept special page names case insensitive?

Note also that the content language must be 'de', interface language doesn't matter.

Made it try harder and scream if still not found in r50933.