Příručka:MergeMessageFileList.php
Soubor MediaWiki: mergeMessageFileList.php | |
---|---|
Lokalita: | maintenance/ |
Zdrojový kód: | master • 1.42.1 • 1.41.2 • 1.39.8 |
Třídy: | MergeMessageFileList |
Podrobnosti
Soubor mergeMessageFileList.php je skript ůdržby pro sloučení $wgExtensionMessagesFiles z různých rozšíření a vytvoření jediného pole obsahujícího všechny soubory zpráv.
Možnosti
Volby | Popis | Požadované | Výchozí hodnota |
---|---|---|---|
--list-file | Soubor obsahující seznam souborů nastavení rozšíření, jeden na řádek. | Volitelné | |
--extensions-dir | Cesta, kde lze najít rozšíření. | Volitelné | |
--output | Odeslat výstup do tohoto souboru | Volitelné | stdout |
Pokud není nastaveno $wgExtensionEntryPointListFiles, musí být poskytnuto buď --list-file nebo --extensions-dir.
Použití
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
Výstup: 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 ......
);
Běžná chyba
- Zápis na $outputFile se nezdařil
K této chybě dochází, když uživatel spouštějící skript nemá oprávnění k zápisu souboru. Pokud jste uživatel root, můžete skript spustit se SUDO.