Public Member Functions | |
__construct (MessageGroup $group, MessageHandle $handle, IContextSource $context) | |
getData () | |
Translation aid class should implement this function. | |
getDefinition () | |
Get the message definition. | |
getTranslations () | |
Get the translations in all languages. | |
Static Public Member Functions | |
static | getTypes () |
List of available message types mapped to the classes implementing them. | |
Protected Attributes | |
$group | |
$handle | |
$context |
Definition at line 20 of file TranslationAid.php.
TranslationAid::__construct | ( | MessageGroup $ | group, | |
MessageHandle $ | handle, | |||
IContextSource $ | context | |||
) |
Definition at line 36 of file TranslationAid.php.
TranslationAid::getData | ( | ) | [abstract] |
Translation aid class should implement this function.
Return value should be an array with keys and values. Because these are used in the MediaWiki API, lists (numeric keys) should have key '**' set to element name that describes the list values. For example if the translation aid provides translation suggestions, it would return an array which has key '**' set to 'suggestion' and then list of arrays, each containing fields for the information of the suggestions. See InOtherLanguagesAid for example.
TranslationHelperException | Used to signal unexpected errors to aid debugging |
Reimplemented in CurrentTranslationAid, DocumentationAid, GettextDocumentationAid, InOtherLanguagesAid, InsertablesAid, MachineTranslationAid, MessageDefinitionAid, SupportAid, TTMServerAid, UnsupportedTranslationAid, and UpdatedDefinitionAid.
TranslationAid::getDefinition | ( | ) |
Get the message definition.
Cached for performance.
Definition at line 64 of file TranslationAid.php.
Referenced by UpdatedDefinitionAid::getData(), TTMServerAid::getData(), MessageDefinitionAid::getData(), and InsertablesAid::getData().
TranslationAid::getTranslations | ( | ) |
Get the translations in all languages.
Cached for performance. Fuzzy translation are not included.
Definition at line 91 of file TranslationAid.php.
Referenced by MachineTranslationAid::getData(), and InOtherLanguagesAid::getData().
static TranslationAid::getTypes | ( | ) | [static] |
List of available message types mapped to the classes implementing them.
Definition at line 127 of file TranslationAid.php.
Referenced by ApiTranslationAids::getAllowedParams(), MessageGroupOld::getTranslationAids(), and MessageGroupBase::getTranslationAids().
TranslationAid::$context [protected] |
Definition at line 34 of file TranslationAid.php.
TranslationAid::$group [protected] |
Definition at line 24 of file TranslationAid.php.
Referenced by InsertablesAid::getData(), and GettextDocumentationAid::getData().
TranslationAid::$handle [protected] |
Definition at line 29 of file TranslationAid.php.