Manuel:MergeMessageFileList.php
Fichier MediaWiki : mergeMessageFileList.php | |
---|---|
Emplacement : | maintenance/ |
Code source : | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes : | MergeMessageFileList |
Détails
Le fichier mergeMessageFileList.php est un script de maintenance pour fusionner $wgExtensionMessagesFiles à partir d'extensions différentes et produire un tableau unique contenant tous les fichiers de messages.
Options
Option | Description | Obligatoire | Valeur par défaut |
---|---|---|---|
--list-file | Un fichier contenant une liste de fichiers de configuration des extensions, un par ligne. | optionnel | |
--extensions-dir | Chemin où se trouvent les extensions. | optionnel | |
--output | Fichiers de sortie | optionnel | stdout |
--list-file ou --extensions-dir doit être fourni si $wgExtensionEntryPointListFiles n'est pas défini.
Utilisation
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
Sortie : 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 ......
);
Erreurs communes
- Echec d'écriture sur $outputFile
Cette erreur arrive quand l'utilisateur exécutant le script n'a pas la permission de modifier le fichier.
Si vous êtes un utilisateur root, vous pouvez exécuter le script avec sudo
.