Manual:MergeMessageFileList.php
MediaWiki file: mergeMessageFileList.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | MergeMessageFileList |
Details
mergeMessageFileList.php file is a maintenance script to merge $wgExtensionMessagesFiles from various extensions to produce a single array containing all message files.
Options
Option | Description | Required | Default value |
---|---|---|---|
--list-file | A file containing a list of extension setup files, one per line. | Optional | |
--extensions-dir | Path where extensions can be found. | Optional | |
--output | Send output to this file | Optional | stdout |
Either --list-file or --extensions-dir must be provided if $wgExtensionEntryPointListFiles is not set.
Usage
php maintenance/mergeMessageFileList.php --extensions-dir extensions/
Terminal
$ php maintenance/mergeMessageFileList.php --extensions-dir extensions/ --output masterMessagesFile.php Loading data from extensions//CategoryTree/extension.json Loading data from extensions//Cite/extension.json Loading data from extensions//CiteThisPage/extension.json Loading data from extensions//CodeEditor/extension.json Loading data from extensions//ConfirmEdit/extension.json Loading data from extensions//DiscussionTools/extension.json Loading data from extensions//Gadgets/extension.json Loading data from extensions//ImageMap/extension.json Loading data from extensions//InputBox/extension.json Loading data from extensions//Interwiki/extension.json Loading data from extensions//Linter/extension.json Loading data from extensions//LocalisationUpdate/extension.json Loading data from extensions//MultimediaViewer/extension.json Loading data from extensions//Nuke/extension.json Loading data from extensions//OATHAuth/extension.json Loading data from extensions//OAuth/extension.json Loading data from extensions//PageImages/extension.json Loading data from extensions//ParserFunctions/extension.json Loading data from extensions//PdfHandler/extension.json Loading data from extensions//Poem/extension.json Loading data from extensions//Renameuser/extension.json Loading data from extensions//ReplaceText/extension.json Loading data from extensions//Scribunto/extension.json Loading data from extensions//SecureLinkFixer/extension.json Loading data from extensions//SpamBlacklist/extension.json Loading data from extensions//SyntaxHighlight_GeSHi/extension.json Loading data from extensions//TemplateData/extension.json Loading data from extensions//TextExtracts/extension.json Loading data from extensions//TitleBlacklist/extension.json Loading data from extensions//VisualEditor/extension.json Loading data from extensions//WikiEditor/extension.json
Output: masterMessagesFile.php
<?php
## This file is generated by mergeMessageFileList.php. Do not edit it directly.
if ( defined( 'MW_NO_EXTENSION_MESSAGES' ) ) return;
$wgExtensionMessagesFiles = array (
'CategoryTreeAlias' => "$IP/extensions/CategoryTree/CategoryTree.alias.php",
'CategoryTreeMagic' => "$IP/extensions/CategoryTree/CategoryTree.i18n.magic.php",
'CiteThisPageAliases' => "$IP/extensions/CiteThisPage/CiteThisPage.alias.php",
'ConfirmEditAlias' => "$IP/extensions/ConfirmEdit/ConfirmEdit.alias.php",
'GadgetsAlias' => "$IP/extensions/Gadgets/Gadgets.alias.php",
'GadgetsNamespaces' => "$IP/extensions/Gadgets/Gadgets.namespaces.php",
'InterwikiAlias' => "$IP/extensions/Interwiki/Interwiki.alias.php",
'LinterAlias' => "$IP/extensions/Linter/Linter.alias.php",
'NukeAlias' => "$IP/extensions/Nuke/Nuke.alias.php",
'OATHAuthAlias' => "$IP/extensions/OATHAuth/OATHAuth.alias.php",
'MWOAuthAliases' => "$IP/extensions/OAuth/MWOAuth.alias.php",
'ParserFunctionsMagic' => "$IP/extensions/ParserFunctions/ParserFunctions.i18n.magic.php",
'RenameuserAliases' => "$IP/extensions/Renameuser/Renameuser.alias.php",
'ReplaceTextAlias' => "$IP/extensions/ReplaceText/ReplaceText.i18n.alias.php",
'ScribuntoMagic' => "$IP/extensions/Scribunto/Scribunto.magic.php",
'ScribuntoNamespaces' => "$IP/extensions/Scribunto/Scribunto.namespaces.php",
'VisualEditorAlias' => "$IP/extensions/VisualEditor/VisualEditor.i18n.alias.php",
);
$wgMessagesDirs = array (
'CategoryTree' =>
array (
0 => "$IP/extensions/CategoryTree/i18n",
1 => "$IP/extensions/CategoryTree/i18n/api",
),
'Cite' =>
array (
0 => "$IP/extensions/Cite/i18n",
1 => "$IP/extensions/Cite/modules/ve-cite/i18n",
),
'CiteThisPage' =>
array (
0 => "$IP/extensions/CiteThisPage/i18n",
),
'CodeEditor' =>
array (
0 => "$IP/extensions/CodeEditor/i18n",
),
'ConfirmEdit' =>
array (
0 => "$IP/extensions/ConfirmEdit/i18n",
1 => "$IP/extensions/ConfirmEdit/i18n/api",
),
'DiscussionTools' =>
array (
0 => "$IP/extensions/DiscussionTools/i18n",
),
'Gadgets' =>
array (
0 => "$IP/extensions/Gadgets/i18n",
1 => "$IP/extensions/Gadgets/i18n/api",
),
'ImageMap' =>
array (
0 => "$IP/extensions/ImageMap/i18n",
),
'InputBox' =>
array (
0 => "$IP/extensions/InputBox/i18n",
),
'Interwiki' =>
array (
0 => "$IP/extensions/Interwiki/i18n",
),
'Linter' =>
array (
0 => "$IP/extensions/Linter/i18n",
1 => "$IP/extensions/Linter/i18n/api",
),
'LocalisationUpdate' =>
array (
0 => "$IP/extensions/LocalisationUpdate/i18n",
),
'MultimediaViewer' =>
array (
0 => "$IP/extensions/MultimediaViewer/i18n",
),
'Nuke' =>
array (
0 => "$IP/extensions/Nuke/i18n",
),
'OATHAuth' =>
array (
0 => "$IP/extensions/OATHAuth/i18n",
1 => "$IP/extensions/OATHAuth/i18n/api",
),
'MWOAuth' =>
array (
0 => "$IP/extensions/OAuth/i18n",
),
'PageImages' =>
array (
0 => "$IP/extensions/PageImages/i18n",
1 => "$IP/extensions/PageImages/i18n/api",
),
'ParserFunctions' =>
array (
0 => "$IP/extensions/ParserFunctions/i18n",
),
# And many more ......
);
Common error
- Failed to write to $outputFile
This error occurs when the user running the script does not have permission to write the file. If you are a root user, you can run the script with sudo.