This class implements default behavior for file based message groups. More...
Public Member Functions | |
exists () | |
If this function returns false, the message group is ignored and treated like it would not be configured at all. | |
getSourceFilePath ($code) | |
getTargetFilename ($code) | |
mapCode ($code) | |
Static Public Member Functions | |
static | newFromMessageGroup ($group) |
Constructs a FileBasedMessageGroup from any normal message group. | |
Protected Member Functions | |
replaceVariables ($pattern, $code) | |
Protected Attributes | |
$reverseCodeMap |
This class implements default behavior for file based message groups.
File based message groups are primary type of groups at translatewiki.net, while other projects may use mainly page translation message groups, or custom type of message groups.
Definition at line 19 of file FileBasedMessageGroup.php.
FileBasedMessageGroup::exists | ( | ) |
If this function returns false, the message group is ignored and treated like it would not be configured at all.
Useful for graceful degradation. Try to keep the check fast to avoid performance problems.
Implements MessageGroup.
Reimplemented in MockFileBasedMessageGroup.
Definition at line 45 of file FileBasedMessageGroup.php.
FileBasedMessageGroup::getSourceFilePath | ( | $ | code | ) |
Definition at line 59 of file FileBasedMessageGroup.php.
Referenced by ProcessMessageChanges::addMessageUpdateChanges().
FileBasedMessageGroup::getTargetFilename | ( | $ | code | ) |
FileBasedMessageGroup::mapCode | ( | $ | code | ) |
$code |
Reimplemented in MediaWikiMessageGroup.
Definition at line 103 of file FileBasedMessageGroup.php.
Referenced by replaceVariables().
static FileBasedMessageGroup::newFromMessageGroup | ( | $ | group | ) | [static] |
Constructs a FileBasedMessageGroup from any normal message group.
Useful for doing special Gettext exports from any group.
$group | MessageGroup |
Definition at line 28 of file FileBasedMessageGroup.php.
Referenced by ExportAsPoMessagesTask::output().
FileBasedMessageGroup::replaceVariables | ( | $ | pattern, | |
$ | code | |||
) | [protected] |
Definition at line 87 of file FileBasedMessageGroup.php.
Referenced by getSourceFilePath(), and getTargetFilename().
FileBasedMessageGroup::$reverseCodeMap [protected] |
Definition at line 20 of file FileBasedMessageGroup.php.