MediaWiki  1.23.8
rebuildLanguage.php File Reference

Rewrite the messages array in the files languages/messages/MessagesXx.php. More...

Go to the source code of this file.


 rebuildLanguage ( $languages, $code, $write, $listUnknown, $removeUnknown, $removeDupes, $dupeMsgSource, $messagesFolder)
 Rewrite a messages array. More...
 removeDupes ( $oldMsgArray, $dupeMsgSource)
 Remove duplicates from a message array. More...


 $languages = new Languages()
 $messagesFolder = isset( $options['messages-folder'] ) ? $options['messages-folder'] : false
 $wgListUnknownMessages = !isset( $options['no-unknown'] )
 $wgRemoveDuplicateMessages = isset( $options['remove-duplicates'] )
 $wgRemoveUnknownMessages = isset( $options['remove-unknown'] )
 $wgWriteToFile = !isset( $options['dry-run'] )
if(isset( $options['help'])) if(isset( $options['lang'])) else

Detailed Description

Rewrite the messages array in the files languages/messages/MessagesXx.php.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file rebuildLanguage.php.

Function Documentation

◆ rebuildLanguage()

rebuildLanguage (   $languages,

Rewrite a messages array.

$codestring The language code.
bool$writeWrite to the messages file?
bool$listUnknownList the unknown messages?
bool$removeUnknownRemove the unknown messages?
bool$removeDupesRemove the duplicated messages?
$dupeMsgSourcestring The source file intended to remove from the array.
$messagesFolderString: path to a folder to store the MediaWiki messages.

Definition at line 41 of file rebuildLanguage.php.

References $languages, $messages, $messagesFolder, removeDupes(), and MessageWriter\writeMessagesToFile().

◆ removeDupes()

removeDupes (   $oldMsgArray,

Remove duplicates from a message array.

$oldMsgArrayarray The input message array.
$dupeMsgSourcestring The source file path for duplicates.
Array $newMsgArray The output message array, with duplicates removed.

Definition at line 66 of file rebuildLanguage.php.

References $value, and as.

Referenced by rebuildLanguage().

Variable Documentation

◆ $languages

$languages = new Languages()

◆ $messagesFolder

$messagesFolder = isset( $options['messages-folder'] ) ? $options['messages-folder'] : false

Definition at line 126 of file rebuildLanguage.php.

Referenced by rebuildLanguage(), and MessageWriter\writeMessagesToFile().

◆ $wgListUnknownMessages

$wgListUnknownMessages = !isset( $options['no-unknown'] )

Definition at line 123 of file rebuildLanguage.php.

◆ $wgRemoveDuplicateMessages

$wgRemoveDuplicateMessages = isset( $options['remove-duplicates'] )

Definition at line 125 of file rebuildLanguage.php.

◆ $wgRemoveUnknownMessages

$wgRemoveUnknownMessages = isset( $options['remove-unknown'] )

Definition at line 124 of file rebuildLanguage.php.

◆ $wgWriteToFile

$wgWriteToFile = !isset( $options['dry-run'] )

Definition at line 122 of file rebuildLanguage.php.

◆ else

if ($wgCode=='all') else
Initial value:
$wgCode = $wgContLang->getCode()

Definition at line 110 of file rebuildLanguage.php.

this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56