MediaWiki  REL1_19
MessageWriter Class Reference

List of all members.

Static Public Member Functions

static makeComments ($messages, $ignored, $optional)
 Generates an array of comments for messages.
static writeMessagesArray ($messages, $ignoredComments=false, $prefix=false, $removeUnknown=false)
 Write a messages array as a PHP text.
static writeMessagesBlock ($blockComment, $messages, $messageComments=array(), $prefix= '')
 Write a block of messages to PHP.
static writeMessagesToFile ($messages, $code, $write, $listUnknown, $removeUnknown)
 Write a messages array as a PHP text and write it to the messages file.

Static Public Attributes

static $blockComments
static $ignoredComment = "do not translate or duplicate this message to other languages"
static $ignoredMessages
static $messageStructure
static $optionalComment = 'only translate this message to other languages if you have to change it'
static $optionalMessages

Detailed Description

Definition at line 27 of file writeMessagesArray.inc.


Member Function Documentation

static MessageWriter::makeComments ( messages,
ignored,
optional 
) [static]

Generates an array of comments for messages.

Parameters:
$messagesArray: key of messages.
$ignoredArray: list of ingored message keys.
$optionalArray: list of optional message keys.

Definition at line 160 of file writeMessagesArray.inc.

References $ignoredComment, $messages, and $optionalComment.

Referenced by writeMessagesArray().

Here is the caller graph for this function:

static MessageWriter::writeMessagesArray ( messages,
ignoredComments = false,
prefix = false,
removeUnknown = false 
) [static]

Write a messages array as a PHP text.

Parameters:
$messagesArray: the messages array.
$ignoredCommentsBoolean: show comments about ignored and optional messages? (For English.)
$prefixString: base path for messages.inc and messageTypes.inc files or false for default path (this directory)
$removeUnknownBoolean: whether to remove unkown messages
Returns:
Array of the PHP text and the sorted messages array.

Definition at line 94 of file writeMessagesArray.inc.

References $dir, $ignoredMessages, $messages, $optionalMessages, $wgBlockComments, $wgIgnoredMessages, $wgMessageStructure, $wgOptionalMessages, makeComments(), and writeMessagesBlock().

Referenced by writeMessagesToFile().

Here is the call graph for this function:

Here is the caller graph for this function:

static MessageWriter::writeMessagesBlock ( blockComment,
messages,
messageComments = array(),
prefix = '' 
) [static]

Write a block of messages to PHP.

Parameters:
$blockCommentString: the comment of whole block.
$messagesArray: the block messages.
$messageCommentsArray: optional comments for messages in this block.
$prefixString: prefix for every line, for indenting purposes.
Returns:
The block, formatted in PHP.

Definition at line 186 of file writeMessagesArray.inc.

References $messages.

Referenced by writeMessagesArray().

Here is the caller graph for this function:

static MessageWriter::writeMessagesToFile ( messages,
code,
write,
listUnknown,
removeUnknown 
) [static]

Write a messages array as a PHP text and write it to the messages file.

Parameters:
$messagesArray: the messages array.
$codeString: the language code.
$writeBoolean: write to the messages file?
$listUnknownBoolean: list the unknown messages?
$removeUnknownBoolean: whether to remove unkown messages

Definition at line 45 of file writeMessagesArray.inc.

References $messages, echo, Language\getMessagesFileName(), and writeMessagesArray().

Referenced by rebuildLanguage().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

MessageWriter::$blockComments [static]

Definition at line 32 of file writeMessagesArray.inc.

MessageWriter::$ignoredComment = "do not translate or duplicate this message to other languages" [static]

Definition at line 29 of file writeMessagesArray.inc.

Referenced by makeComments().

MessageWriter::$ignoredMessages [static]

Definition at line 33 of file writeMessagesArray.inc.

Referenced by writeMessagesArray().

MessageWriter::$messageStructure [static]

Definition at line 31 of file writeMessagesArray.inc.

MessageWriter::$optionalComment = 'only translate this message to other languages if you have to change it' [static]

Definition at line 28 of file writeMessagesArray.inc.

Referenced by makeComments().

MessageWriter::$optionalMessages [static]

Definition at line 34 of file writeMessagesArray.inc.

Referenced by writeMessagesArray().


The documentation for this class was generated from the following file: