Page MenuHomePhabricator

MediaWiki:Monobook.js is affected by lingualization
Closed, ResolvedPublic

Description

Author: ezyang

Description:
The system message system works like this:

  1. If the user is using the default language, messages are retrieved from

[[MediaWiki:Message]]

  1. If the user is using a different language, messages are retrieved from

[[MediaWiki:Message/Lang]]

If the message is found not to exist, it is defaulted to the system default. For
most purposes, this is good behavior, but not all messages need this
multilingual behavior. A good example is Monobook.css or Monobook.js.

There are two possible ways of fixing this behavior:

  1. Specify specific system messages as non-lingual and disable multilingual

capability for them

  1. Specify specific system messages as non-lingual, and have their fallback in

the default language space before falling back to the system default.

I got bitten by this when I specified English and then wondered why Monobook.js
wasn't working for me.


Version: 1.8.x
Severity: normal
OS: Windows XP
Platform: PC

Details

Reference
bz7223

Event Timeline

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

Those are/should be used with wfMsgForContent, and don't use the user-selected language.

ezyang wrote:

http://beta.wikiversity.org/w/index.php?title=-&action=raw&smaxage=0&gen=js
appears to exhibit improper behavior when a language is specified.

Steps to reproduce:

  1. Log into an account
  2. Switch language preference to one other than beta
  3. Load http://beta.wikiversity.org/w/index.php?title=-&action=raw&smaxage=0&gen=js

Expected result:

MediaWiki:Monobook.js is served up with the language select code.

Actual result:

MediaWiki:Monobook.js/en is served, which is nonexistent, meaning default value
is served.

Yes, seems to be a problem there. :(