From: Max Semenik Date: Fri, 8 Mar 2019 23:23:10 +0000 (-0800) Subject: Remove $wgMediaInTargetLanguage X-Git-Tag: 1.34.0-rc.0~2582^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=1e9db557d7a14ae1493b3ae8a5d1e9b2ab2f03c6;p=lhc%2Fweb%2Fwiklou.git Remove $wgMediaInTargetLanguage It's a temporary feature flag not included in any release, just removing it outright. The functonality will now be always enabled. Bug: T205040 Change-Id: Ia9da82e6f6b2d270f1790a99fc8c35ad5e6aee5e --- diff --git a/RELEASE-NOTES-1.33 b/RELEASE-NOTES-1.33 index 0180763f7d..d8879fc570 100644 --- a/RELEASE-NOTES-1.33 +++ b/RELEASE-NOTES-1.33 @@ -11,8 +11,6 @@ production. * $wgEnablePartialBlocks – This enables the Partial Blocks feature, which gives accounts with block permissions the ability to block users, IPs, and IP ranges from editing specific pages, while allowing them to edit the rest of the wiki. -* $wgMediaInTargetLanguage – whether multilingual images should be dispalyed in - the current parse language where available. ==== Changed configuration ==== * Some external link searches will not work correctly until update.php (or @@ -61,6 +59,8 @@ production. (requires PHP 7.2+) and GPU hacking (7.3+). * Special:CreateAccount now warns the user if their chosen username has to be normalized. +* (T205040) Multilingual images are now be displayed in the current parse + language where available. === External library changes in 1.33 === diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 04d3c85265..546152f6c9 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5282,8 +5282,6 @@ class Parser { # * bottom # * text-bottom - global $wgMediaInTargetLanguage; - # Protect LanguageConverter markup when splitting into parts $parts = StringUtils::delimiterExplode( '-{', '}-', '|', $options, true /* allow nesting */ @@ -5444,9 +5442,7 @@ class Parser { # Use the "caption" for the tooltip text $params['frame']['title'] = $this->stripAltText( $caption, $holders ); } - if ( $wgMediaInTargetLanguage ) { - $params['handler']['targetlang'] = $this->getTargetLanguage()->getCode(); - } + $params['handler']['targetlang'] = $this->getTargetLanguage()->getCode(); Hooks::run( 'ParserMakeImageParams', [ $title, $file, &$params, $this ] ); diff --git a/tests/parser/ParserTestRunner.php b/tests/parser/ParserTestRunner.php index 0e6a3eed77..699de951b6 100644 --- a/tests/parser/ParserTestRunner.php +++ b/tests/parser/ParserTestRunner.php @@ -282,7 +282,6 @@ class ParserTestRunner { $setup['wgHtml5'] = true; $setup['wgDisableLangConversion'] = false; $setup['wgDisableTitleConversion'] = false; - $setup['wgMediaInTargetLanguage'] = false; // "extra language links" // see https://gerrit.wikimedia.org/r/111390 @@ -1090,7 +1089,6 @@ class ParserTestRunner { + [ 'ISBN' => true, 'PMID' => true, 'RFC' => true ], // Test with legacy encoding by default until HTML5 is very stable and default 'wgFragmentMode' => [ 'legacy' ], - 'wgMediaInTargetLanguage' => self::getOptionValue( 'wgMediaInTargetLanguage', $opts, false ), ]; $nonIncludable = self::getOptionValue( 'wgNonincludableNamespaces', $opts, false ); diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index a73d036b48..7ef057a925 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -37,7 +37,7 @@ # You can also set the following parser properties via test options: # wgEnableUploads, wgAllowExternalImages, wgMaxTocLevel, # wgLinkHolderBatchSize, wgRawHtml, wgInterwikiMagic, -# wgEnableMagicLinks, wgMediaInTargetLanguage +# wgEnableMagicLinks # # For testing purposes, temporary articles can created: # !!article / NAMESPACE:TITLE / !!text / ARTICLE TEXT / !!endarticle @@ -15955,7 +15955,6 @@ parsoid=wt2html,wt2wt,html2html SVG thumbnails in page language !! options language=ru -wgMediaInTargetLanguage = true !! wikitext [[File:Foobar.svg]] [[File:Foobar.svg|lang=en]] !! html/php @@ -15967,7 +15966,6 @@ wgMediaInTargetLanguage = true SVG thumbnails in page language not present in the file !! options language=de -wgMediaInTargetLanguage = true !! wikitext [[File:Foobar.svg]] [[File:Foobar.svg|lang=ru]] !! html/php