wiki.techinc.nl/languages
Timo Tijhof 75ccdc6147 languages: Move default $wgNamespaceAliases to MessagesEn.php
These are not configuration but business logic, similar to the
canonical names that are in NamespaceInfo.php, these must always
exist and cannot be altered or unset.

They were previously unconditionally assigned during all requests
in Setup.php and passed down as "site configuration".

Changes:

* Move them to MessagesEn.php where they can be cached and
  processed the same way as other core-provided aliases.

  Document and confirm with tests that this is a mergeable
  attribute that follows the language chain.

* Remove the duplicated code in a few places that was reading
  this variable + Language::getNamespaceAliases(), to instead
  just call the latter and move the logic there, centralised,
  and tested.

  In doing so I noticed that these were applied in an
  inconsistent order. Sometimes the config won, sometimes not.
  There's no obvious right or wrong way here, but I've chosen
  to standardise on the way that Language::getNamespaceIds() did
  it, which is that config wins. This because that method seems
  to be most widely used of the three (it decides how URLs and
  titles are parsed), and thus the one I least want to change
  the behaviour of.

* Document that $wgNamespaceAliases may only be used to
  define (extra) aliases, it is and never was a way to access
  the complete list of aliases.

Bug: T189966
Change-Id: Ibb14181aba8c1b509264ed40523e9ab4000fd71a
2020-03-14 19:27:40 +00:00
..
classes Reduce usage of the Language class 2020-03-03 01:38:27 +03:00
converters language: remove Language hints for type check as it breaks using of StubUserLang 2020-02-05 16:11:31 +02:00
data Chinese Conversion Table Update 2020-1 2020-03-03 23:26:43 +00:00
i18n Enhance passwored reset message 2020-03-13 16:18:48 -07:00
messages languages: Move default $wgNamespaceAliases to MessagesEn.php 2020-03-14 19:27:40 +00:00
.htaccess
Language.php languages: Move default $wgNamespaceAliases to MessagesEn.php 2020-03-14 19:27:40 +00:00
LanguageConverter.php languages: Avoid usage of deprecated MessageCache::singleton() 2020-03-11 12:12:24 +01:00
LanguageConverterFactory.php language: Clean up file headers and class-level docs 2020-02-12 02:15:44 +00:00
TrivialLanguageConverter.php Merge "Remove LanguageConverter dependencies on Title and use LinkTarget" 2020-02-12 22:44:12 +00:00