Various editing enhancements to the edit page interface. More...
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) |
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.
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.
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.
static TranslateEditAddons::checkNeedsFuzzy | ( | MessageHandle $ | handle, | |
$ | text | |||
) | [static, protected] |
MessageHandle | $handle | |
string | $text |
Definition at line 375 of file TranslateEditAddons.php.
Referenced by onSave().
static TranslateEditAddons::disablePreSaveTransform | ( | $ | wikiPage, | |
ParserOptions $ | popts | |||
) | [static] |
Hook: ArticlePrepareTextForEdit.
WikiPage | $wikiPage | |
ParserOptions | $popts |
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.
static TranslateEditAddons::editBoxes | ( | EditPage $ | editpage | ) | [static, private] |
EditPage | $editpage |
Definition at line 262 of file TranslateEditAddons.php.
Referenced by addTools().
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.
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 |
Definition at line 113 of file TranslateEditAddons.php.
static TranslateEditAddons::hasFuzzyString | ( | $ | text | ) | [static] |
Check if a string contains the fuzzy string.
string | $text Arbitrary text |
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.
static TranslateEditAddons::isFuzzy | ( | Title $ | title | ) | [static] |
Check if a title is marked as fuzzy.
Title | $title |
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.
static TranslateEditAddons::updateFuzzyTag | ( | Title $ | title, | |
$ | revision, | |||
$ | fuzzy | |||
) | [static, protected] |
Title | $title | |
int | $revision | |
bool | $fuzzy |
Definition at line 411 of file TranslateEditAddons.php.
Referenced by onSave().
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
MessageHandle | $handle | |
int | $revision | |
string | $text | |
User | $user |
Definition at line 440 of file TranslateEditAddons.php.