Page MenuHomePhabricator

MediaWiki:Sidebar does not use i18n for entire menu or links if exists
Closed, InvalidPublic

Description

Situation (simplified):

MediaWiki:Sidebar:

  • header
    • somepage-url|somepage
    • sandbox-url|sandbox

Page (message) | Content
----------------+--------------------------
header | Navigation
header/cs | Navigace
somepage-url | Some Page
somepage-url/cs | Nějaká stránka
somepage | Go to Some Page
somepage/cs | Přejdi na nějakou stránku
sandbox-url | Project:Sandbox
sandbox-url/cs | Project:Pískoviště
sandbox | Sandbox
sandbox/cs | Pískoviště

Being on site with site language = en, it renders:
Navigation

  • Some Page|Go to Some Page
  • Project:Sandbox|Sandbox

Having either uselang=cs or en in preferences set, it renders (*):
Navigace

  • Some Page|Přejdi na nějakou stránku
  • Project:Sandbox|Pískoviště

instead of correct:
Navigace

  • Nějaká stránka|Přejdi na nějakou stránku
  • Project:Pískoviště|Pískoviště

Tried also to set up
MediaWiki:Sidebar/cs:

  • header
    • somepage-url|somepage
    • sandbox-url|sandbox

and also:
MediaWiki:Sidebar/cs:

  • header/cs
    • somepage-url/cs|somepage/cs
    • sandbox-url/cs|sandbox/cs

and other combinations of items with and without /cs suffix, none was working, the best rendering was the (*) marked above.

Neither putting direct urls instead of message call to MediaWiki:Sidebar/cs did work.

Besides MediaWiki:Sidebar/cs is completely ignored - thus it's impossible to make different menus for different languages (typical purpose would be abc ordering of items, but there are many other, especially on multilingual sites).

So obviously links are rendered only using site language message and i18ned sidebars are ignored, which is both bad and should be enabled to display their i18n form and then fallback to site language if appropriate message doesn't exist.


Version: unspecified
Severity: major

Details

Reference
bz14677

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:12 PM
bzimport set Reference to bz14677.
bzimport added a subscriber: Unknown Object (MLST).

This is because sidebar uses wfMsgForContent. It can be changed by [[mw:Manual:$wgForceUIMsgAsContentMsg]].

This is by design. UI language affects UI, not content.