jenkins-bot has submitted this change and it was merged.
Change subject: Rename $wgExtensionMessagesDirs to $wgMessagesDirs
......................................................................
Rename $wgExtensionMessagesDirs to $wgMessagesDirs
This is a better name, as we'll also be adding core and the installer i18n
to this.
Change-Id: Ic4c5849654aef54f3e5aea01a2d68e47d148b9bd
---
M includes/DefaultSettings.php
M includes/cache/LocalisationCache.php
M maintenance/mergeMessageFileList.php
3 files changed, 13 insertions(+), 13 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 7522c55..f0c0ee5 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5934,13 +5934,13 @@
* in the core.
*
* Since MediaWiki 1.23, use of this variable to define messages is
discouraged; instead, store
- * messages in JSON format and use $wgExtensionMessagesDirs. For setting other
variables than
+ * messages in JSON format and use $wgMessagesDirs. For setting other
variables than
* $messages, $wgExtensionMessagesFiles should still be used.
*
- * If there is an entry in $wgExtensionMessagesDirs with the same key as one in
+ * If there is an entry in $wgMessagesDirs with the same key as one in
* $wgExtensionMessagesFiles, then any $messages variables set in the
$wgExtensionMessagesFiles file
* will be ignored. This means an extension that only provides messages can be
backwards compatible
- * by using both $wgExtensionMessagesFiles and $wgExtensionMessagesDirs, and
only one of the two
+ * by using both $wgExtensionMessagesFiles and $wgMessagesDirs, and only one
of the two
* will be used depending on what the version of MediaWiki supports.
*
* @par Example:
@@ -5960,12 +5960,12 @@
*
* @par Simple example:
* @code
- * $wgExtensionMessagesDirs['ConfirmEdit'] = __DIR__ . '/i18n';
+ * $wgMessagesDirs['ConfirmEdit'] = __DIR__ . '/i18n';
* @endcode
*
* @par Complex example:
* @code
- * $wgExtensionMessagesDirs['VisualEditor'] = array(
+ * $wgMessagesDirs['VisualEditor'] = array(
* __DIR__ . '/i18n',
* __DIR__ . '/modules/ve-core/i18n',
* __DIR__ . '/modules/qunit/localisation',
@@ -5974,7 +5974,7 @@
* @endcode
* @since 1.23
*/
-$wgExtensionMessagesDirs = array();
+$wgMessagesDirs = array();
/**
* Array of files with list(s) of extension entry points to be used in
diff --git a/includes/cache/LocalisationCache.php
b/includes/cache/LocalisationCache.php
index 36de86c..41f24dc 100644
--- a/includes/cache/LocalisationCache.php
+++ b/includes/cache/LocalisationCache.php
@@ -766,7 +766,7 @@
* @throws MWException
*/
public function recache( $code ) {
- global $wgExtensionMessagesFiles, $wgExtensionMessagesDirs;
+ global $wgExtensionMessagesFiles, $wgMessagesDirs;
wfProfileIn( __METHOD__ );
if ( !$code ) {
@@ -840,7 +840,7 @@
# like site-specific message overrides.
wfProfileIn( __METHOD__ . '-extensions' );
$allData = $initialData;
- foreach ( $wgExtensionMessagesDirs as $dirs ) {
+ foreach ( $wgMessagesDirs as $dirs ) {
foreach ( (array)$dirs as $dir ) {
foreach ( $codeSequence as $csCode ) {
$fileName = "$dir/$csCode.json";
@@ -860,9 +860,9 @@
$used = false;
foreach ( $data as $key => $item ) {
- if ( $key === 'messages' && isset(
$wgExtensionMessagesDirs[$extension] ) ) {
+ if ( $key === 'messages' && isset(
$wgMessagesDirs[$extension] ) ) {
# For backwards compatibility, ignore
messages from extensions in
- # $wgExtensionMessagesFiles that are
also present in $wgExtensionMessagesDirs.
+ # $wgExtensionMessagesFiles that are
also present in $wgMessagesDirs.
# This allows extensions to use both
and be backwards compatible.
# Variables other than $messages still
need to be supported though.
continue;
@@ -885,7 +885,7 @@
# Add cache dependencies for any referenced globals
$deps['wgExtensionMessagesFiles'] = new GlobalDependency(
'wgExtensionMessagesFiles' );
- $deps['wgExtensionMessagesDirs'] = new GlobalDependency(
'wgExtensionMessagesDirs' );
+ $deps['wgMessagesDirs'] = new GlobalDependency(
'wgMessagesDirs' );
$deps['version'] = new ConstantDependency( 'MW_LC_VERSION' );
# Add dependencies to the cache entry
diff --git a/maintenance/mergeMessageFileList.php
b/maintenance/mergeMessageFileList.php
index a7f5f44..a63c45b 100644
--- a/maintenance/mergeMessageFileList.php
+++ b/maintenance/mergeMessageFileList.php
@@ -46,7 +46,7 @@
$this->addOption( 'list-file', 'A file containing a list of
extension setup files, one per line.', false, true );
$this->addOption( 'extensions-dir', 'Path where extensions can
be found.', false, true );
$this->addOption( 'output', 'Send output to this file (omit for
stdout)', false, true );
- $this->mDescription = 'Merge $wgExtensionMessagesFiles and
$wgExtensionMessagesDirs from ' .
+ $this->mDescription = 'Merge $wgExtensionMessagesFiles and
$wgMessagesDirs from ' .
' various extensions to produce a single file listing
all message files and dirs.';
}
@@ -159,7 +159,7 @@
"## This file is generated by mergeMessageFileList.php. Do not edit it
directly.\n\n" .
"if ( defined( 'MW_NO_EXTENSION_MESSAGES' ) ) return;\n\n" .
'$wgExtensionMessagesFiles = ' . var_export( $wgExtensionMessagesFiles,
true ) . ";\n\n" .
- '$wgExtensionMessagesDirs = ' . var_export( $wgExtensionMessagesDirs,
true ) . ";\n\n";
+ '$wgMessagesDirs = ' . var_export( $wgMessagesDirs, true ) . ";\n\n";
$dirs = array(
$IP,
--
To view, visit https://gerrit.wikimedia.org/r/102957
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4c5849654aef54f3e5aea01a2d68e47d148b9bd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits