TranslationAid Class Reference

Inheritance diagram for TranslationAid:
Inheritance graph
[legend]

List of all members.

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

Detailed Description

Definition at line 20 of file TranslationAid.php.


Constructor & Destructor Documentation

TranslationAid::__construct ( MessageGroup group,
MessageHandle handle,
IContextSource $  context 
)

Definition at line 36 of file TranslationAid.php.


Member Function Documentation

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.

Exceptions:
TranslationHelperException Used to signal unexpected errors to aid debugging
Returns:
array

Reimplemented in CurrentTranslationAid, DocumentationAid, GettextDocumentationAid, InOtherLanguagesAid, InsertablesAid, MachineTranslationAid, MessageDefinitionAid, SupportAid, TTMServerAid, UnsupportedTranslationAid, and UpdatedDefinitionAid.

TranslationAid::getDefinition (  ) 

Get the message definition.

Cached for performance.

Returns:
string

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.

Returns:
array Language code => Translation

Definition at line 91 of file TranslationAid.php.

Referenced by MachineTranslationAid::getData(), and InOtherLanguagesAid::getData().

Here is the call graph for this function:

static TranslationAid::getTypes (  )  [static]

List of available message types mapped to the classes implementing them.

Returns:
array

Definition at line 127 of file TranslationAid.php.

Referenced by ApiTranslationAids::getAllowedParams(), MessageGroupOld::getTranslationAids(), and MessageGroupBase::getTranslationAids().


Member Data Documentation

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.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:56 2013 for MediaWiki Translate Extension by  doxygen 1.6.3