From: robin Date: Wed, 4 Jul 2012 22:00:44 +0000 (+0200) Subject: Make dates in sortable tables depend on page content language X-Git-Tag: 1.31.0-rc.0~23038^2 X-Git-Url: http://git.cyclocoop.org/%27-%20%20.%20url_absolue%28find_in_path%28%27spip_style.css%27%29%29%20%20%20.%20url_absolue%28find_in_path%28%27prive/spip_style.css%27%29%29%20.%20%27?a=commitdiff_plain;h=5165d83505158e81077d6759cde888d06bf5ab2d;p=lhc%2Fweb%2Fwiklou.git Make dates in sortable tables depend on page content language Make javascript variables wgDefaultDateFormat, wgMonthNames and wgMonthNames, used to sort dates in tables, depend on the page content language. Change-Id: I18a53ba004f3dd877e2d06ed722491167e31b473 --- diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index e56cf60953..fdd4c1e29f 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -93,6 +93,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki. * (bug 34678) Added InternalParseBeforeSanitize hook which gets called during Parser's internalParse method just before the parser removes unwanted/dangerous HTML tags. * (bug 36783) Implement jQuery Promise interface in mediawiki.api module. +* Make dates in sortable tables sort according to the page content language + instead of the site content language === Bug fixes in 1.20 === * (bug 30245) Use the correct way to construct a log page title. diff --git a/includes/OutputPage.php b/includes/OutputPage.php index ac90e6741b..1b4bc4942b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2963,6 +2963,9 @@ $templates 'wgPageContentLanguage' => $lang->getCode(), 'wgSeparatorTransformTable' => $compactSeparatorTransTable, 'wgDigitTransformTable' => $compactDigitTransTable, + 'wgDefaultDateFormat' => $lang->getDefaultDateFormat(), + 'wgMonthNames' => $lang->getMonthNamesArray(), + 'wgMonthNamesShort' => $lang->getMonthAbbreviationsArray(), 'wgRelevantPageName' => $relevantTitle->getPrefixedDBKey(), ); if ( $wgContLang->hasVariants() ) { diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 467a1ac0f6..c86ed1d756 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -79,9 +79,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { 'wgVersion' => $wgVersion, 'wgEnableAPI' => $wgEnableAPI, 'wgEnableWriteAPI' => $wgEnableWriteAPI, - 'wgDefaultDateFormat' => $wgContLang->getDefaultDateFormat(), - 'wgMonthNames' => $wgContLang->getMonthNamesArray(), - 'wgMonthNamesShort' => $wgContLang->getMonthAbbreviationsArray(), 'wgMainPageTitle' => $mainPage->getPrefixedText(), 'wgFormattedNamespaces' => $wgContLang->getFormattedNamespaces(), 'wgNamespaceIds' => $namespaceIds,