TranslateEditAddons Class Reference

Various editing enhancements to the edit page interface. More...

List of all members.

Static Public Member Functions

static intro (EditPage $editpage)
 Keep the usual diiba daaba hidden from translators.
static addTools (EditPage $object)
 Adds the translation aids and navigation to the normal edit page.
static buttonHack (EditPage $editpage, &$buttons, $tabindex)
 Replace the normal save button with one that says if you are editing message documentation to try to avoid accidents.
static hasFuzzyString ($text)
 Check if a string contains the fuzzy string.
static isFuzzy (Title $title)
 Check if a title is marked as fuzzy.
static keepFields (EditPage $editpage, OutputPage $out)
 Hook: EditPage::showEditForm:fields.
static onSave ($wikiPage, $user, $content, $summary, $minor, $_, $_, $flags, $revision)
 Runs message checks, adds tp:transver tags and updates statistics.
static updateTransverTag (MessageHandle $handle, $revision, $text, User $user)
 Adds tag which identifies the revision of source message at that time.
static disablePreSaveTransform ($wikiPage, ParserOptions $popts)
 Hook: ArticlePrepareTextForEdit.
static displayOnDiff (DifferenceEngine $de, OutputPage $out)
 Hook: ArticleContentOnDiff.

Static Protected Member Functions

static addTab ($skin, &$tabs, $name, $data, &$index)
static figureNextPrevMessages (MessageHandle $handle, &$key, &$index, &$next, &$prev)
 Takes a MessageHandle, loads the keys of the primary group it belongs to and tries to find messages coming before and after.
static checkNeedsFuzzy (MessageHandle $handle, $text)
static updateFuzzyTag (Title $title, $revision, $fuzzy)

Static Private Member Functions

static editBoxes (EditPage $editpage)

Detailed Description

Various editing enhancements to the edit page interface.

Partly succeeded by the new ajax-enhanced editor but kept for compatibility. Also has code that is still relevant, like the hooks on save.

Definition at line 18 of file TranslateEditAddons.php.


Member Function Documentation

static TranslateEditAddons::addTab ( skin,
&$  tabs,
name,
data,
&$  index 
) [static, protected]

Definition at line 92 of file TranslateEditAddons.php.

static TranslateEditAddons::addTools ( EditPage $  object  )  [static]

Adds the translation aids and navigation to the normal edit page.

Hook: EditPage::showEditForm:initial

Definition at line 188 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::buttonHack ( EditPage $  editpage,
&$  buttons,
tabindex 
) [static]

Replace the normal save button with one that says if you are editing message documentation to try to avoid accidents.

Hook: EditPageBeforeEditButtons

Definition at line 204 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::checkNeedsFuzzy ( MessageHandle handle,
text 
) [static, protected]
Parameters:
MessageHandle $handle
string $text
Returns:
bool

Definition at line 375 of file TranslateEditAddons.php.

Referenced by onSave().

Here is the call graph for this function:

static TranslateEditAddons::disablePreSaveTransform ( wikiPage,
ParserOptions $  popts 
) [static]

Hook: ArticlePrepareTextForEdit.

Parameters:
WikiPage $wikiPage
ParserOptions $popts
Returns:
bool

Definition at line 478 of file TranslateEditAddons.php.

static TranslateEditAddons::displayOnDiff ( DifferenceEngine $  de,
OutputPage $  out 
) [static]

Hook: ArticleContentOnDiff.

Definition at line 494 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::editBoxes ( EditPage $  editpage  )  [static, private]
Parameters:
EditPage $editpage
Returns:
string

Definition at line 262 of file TranslateEditAddons.php.

Referenced by addTools().

Here is the call graph for this function:

static TranslateEditAddons::figureNextPrevMessages ( MessageHandle handle,
&$  key,
&$  index,
&$  next,
&$  prev 
) [static, protected]

Takes a MessageHandle, loads the keys of the primary group it belongs to and tries to find messages coming before and after.

Parameters:
MessageHandle $handle
string &$key will be filled with message in correct case etc.
int|null &$index approximate index of the message, for setting offset and limit on Special:Translate
Title|null &$next Title of the next message or null
Title|null &$prev Title of the previous message or null
Since:
2012-08-21

Definition at line 113 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::hasFuzzyString ( text  )  [static]

Check if a string contains the fuzzy string.

Parameters:
string $text Arbitrary text
Returns:
bool If string contains fuzzy string.

Definition at line 289 of file TranslateEditAddons.php.

Referenced by checkNeedsFuzzy(), TranslationHelpers::getApertiumSuggestion(), CurrentTranslationAid::getData(), and TranslationHelpers::getYandexSuggestion().

static TranslateEditAddons::intro ( EditPage $  editpage  )  [static]

Keep the usual diiba daaba hidden from translators.

Hook: AlternateEdit

Definition at line 156 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::isFuzzy ( Title $  title  )  [static]

Check if a title is marked as fuzzy.

Parameters:
Title $title
Returns:
bool If title is marked fuzzy.

Definition at line 299 of file TranslateEditAddons.php.

Referenced by TranslationHelpers::getApertiumSuggestion(), CurrentTranslationAid::getData(), and TranslationHelpers::getYandexSuggestion().

static TranslateEditAddons::keepFields ( EditPage $  editpage,
OutputPage $  out 
) [static]

Hook: EditPage::showEditForm:fields.

Definition at line 309 of file TranslateEditAddons.php.

static TranslateEditAddons::onSave ( wikiPage,
user,
content,
summary,
minor,
_,
_,
flags,
revision 
) [static]

Runs message checks, adds tp:transver tags and updates statistics.

Hook: ArticleSaveComplete, PageContentSaveComplete

Switch to this when BC goes no further than 1.21: public static function onSave( WikiPage $wikiPage, $user, $content, $summary,

Definition at line 329 of file TranslateEditAddons.php.

Here is the call graph for this function:

static TranslateEditAddons::updateFuzzyTag ( Title $  title,
revision,
fuzzy 
) [static, protected]
Parameters:
Title $title
int $revision
bool $fuzzy

Definition at line 411 of file TranslateEditAddons.php.

Referenced by onSave().

Here is the call graph for this function:

static TranslateEditAddons::updateTransverTag ( MessageHandle handle,
revision,
text,
User $  user 
) [static]

Adds tag which identifies the revision of source message at that time.

This is used to show diff against current version of source message when updating a translation. Hook: Translate:newTranslation

Parameters:
MessageHandle $handle
int $revision
string $text
User $user
Returns:
bool

Definition at line 440 of file TranslateEditAddons.php.

Here is the call graph for this function:


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