Deprecated since 1.16 and unused in known git.
Bug: T199291
Change-Id: Idcaf1b2c24c64653f700be4fe810ed124ba4ab7c
that LoginSignupSpecialPage->getBCFieldDefinitions() is removed.
* The 'jquery.localize' module, deprecated in 1.32, has been removed. Instead,
use 'jquery.i18n'.
+* The hooks LanguageGetSpecialPageAliases and LanguageGetMagic, deprecated since
+ 1.16, have now been removed. Instead, use $specialPageAliases or $magicWords
+ respectively in a $wgExtensionMessagesFiles file.
* …
=== Deprecations in 1.33 ===
$code: The language code or the language we're looking for a messages file for
&$file: The messages file path, you can override this to change the location.
-'LanguageGetMagic': DEPRECATED since 1.16! Use $magicWords in a file listed in
-$wgExtensionMessagesFiles instead.
-Use this to define synonyms of magic words depending of the language
-&$magicExtensions: associative array of magic words synonyms
-$lang: language code (string)
-
'LanguageGetNamespaces': Provide custom ordering for namespaces or
remove namespaces. Do not use this hook to add namespaces. Use
CanonicalNamespaces for that.
&$namespaces: Array of namespaces indexed by their numbers
-'LanguageGetSpecialPageAliases': DEPRECATED! Use $specialPageAliases in a file
-listed in $wgExtensionMessagesFiles instead.
-Use to define aliases of special pages names depending of the language
-&$specialPageAliases: associative array of magic words synonyms
-$lang: language code (string)
-
'LanguageGetTranslatedLanguageNames': Provide translated language names.
&$names: array of language code => language name
$code: language of the preferred translations
public $mConverter;
public $mVariants, $mCode, $mLoaded = false;
- public $mMagicExtensions = [], $mMagicHookDone = false;
+ public $mMagicExtensions = [];
private $mHtmlCode = null, $mParentLanguage = false;
public $dateFormatStrings = [];
return self::$dataCache->getItem( $this->mCode, 'magicWords' );
}
- /**
- * Run the LanguageGetMagic hook once.
- */
- protected function doMagicHook() {
- if ( $this->mMagicHookDone ) {
- return;
- }
- $this->mMagicHookDone = true;
- Hooks::run( 'LanguageGetMagic', [ &$this->mMagicExtensions, $this->getCode() ], '1.16' );
- }
-
/**
* Fill a MagicWord object with data from here
*
* @param MagicWord $mw
*/
function getMagic( $mw ) {
- // Saves a function call
- if ( !$this->mMagicHookDone ) {
- $this->doMagicHook();
- }
-
$rawEntry = $this->mMagicExtensions[$mw->mId] ??
self::$dataCache->getSubitem( $this->mCode, 'magicWords', $mw->mId );
// Initialise array
$this->mExtendedSpecialPageAliases =
self::$dataCache->getItem( $this->mCode, 'specialPageAliases' );
- Hooks::run( 'LanguageGetSpecialPageAliases',
- [ &$this->mExtendedSpecialPageAliases, $this->getCode() ], '1.16' );
}
return $this->mExtendedSpecialPageAliases;
* used aliases. The aliases SHOULD be sorted by the following convention:
* 1. Local first, English last, then
* 2. Most common first, least common last.
- *
- * This array can be modified at runtime with the LanguageGetMagic hook
*/
$magicWords = [
# ID CASE SYNONYMS
* Alternate names of special pages. All names are case-insensitive. The first
* listed alias will be used as the default. Aliases from the fallback
* localisation (usually English) will be included by default.
- *
- * This array may be altered at runtime using the LanguageGetSpecialPageAliases
- * hook.
*/
$specialPageAliases = [
'Activeusers' => [ 'ActiveUsers' ],
* Please include the English words as synonyms. This allows people
* from other wikis to contribute more easily.
* Please don't remove deprecated values, them should be keeped for backward compatibility.
- *
- * This array can be modified at runtime with the LanguageGetMagic hook
*/
$magicWords = [
'redirect' => [ '0', '#ايداۋ', '#АЙДАУ', '#REDIRECT' ],