MediaWiki  REL1_22
rebuildLanguage.php File Reference

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

Go to the source code of this file.

Functions

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

Variables

 $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'] )

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. http://www.gnu.org/copyleft/gpl.html

Definition in file rebuildLanguage.php.


Function Documentation

rebuildLanguage ( languages,
code,
write,
listUnknown,
removeUnknown,
removeDupes,
dupeMsgSource,
messagesFolder 
)

Rewrite a messages array.

Parameters:
$languages
$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 ( oldMsgArray,
dupeMsgSource 
)

Remove duplicates from a message array.

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

Definition at line 57 of file rebuildLanguage.php.

References $key, $value, and as.

Referenced by rebuildLanguage().


Variable Documentation

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

Definition at line 114 of file rebuildLanguage.php.

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

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

Definition at line 111 of file rebuildLanguage.php.

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

Definition at line 113 of file rebuildLanguage.php.

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

Definition at line 112 of file rebuildLanguage.php.