Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\PageTranslation\TranslationPage Class Reference

Generates wikitext source code for translation pages. More...

Public Member Functions

 __construct (ParserOutput $output, WikiPageMessageGroup $group, Language $targetLanguage, Language $sourceLanguage, bool $showOutdated, bool $wrapUntranslated, Title $sourcePageTitle)
 
 generateSource ()
 Generate translation page source using default options.
 
 getPageContent ()
 
 getMessageCollection ()
 
 filterMessageCollection (MessageCollection $collection)
 
 extractMessages (MessageCollection $collection)
 
 generateSourceFromTranslations (array $messages)
 

Detailed Description

Generates wikitext source code for translation pages.

Also handles loading of translations, but that can be skipped and translations given directly.

Author
Niklas Laxström @license GPL-2.0-or-later
Since
2020.08

Definition at line 23 of file TranslationPage.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::__construct ( ParserOutput $output,
WikiPageMessageGroup $group,
Language $targetLanguage,
Language $sourceLanguage,
bool $showOutdated,
bool $wrapUntranslated,
Title $sourcePageTitle )

Definition at line 39 of file TranslationPage.php.

Member Function Documentation

◆ extractMessages()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::extractMessages ( MessageCollection $collection)
Returns
TMessage[]

Definition at line 86 of file TranslationPage.php.

◆ filterMessageCollection()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::filterMessageCollection ( MessageCollection $collection)

Definition at line 76 of file TranslationPage.php.

◆ generateSource()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::generateSource ( )

Generate translation page source using default options.

Definition at line 58 of file TranslationPage.php.

◆ generateSourceFromTranslations()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::generateSourceFromTranslations ( array $messages)
Parameters
TMessage[]$messages

Definition at line 97 of file TranslationPage.php.

◆ getMessageCollection()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::getMessageCollection ( )

Definition at line 72 of file TranslationPage.php.

◆ getPageContent()

MediaWiki\Extension\Translate\PageTranslation\TranslationPage::getPageContent ( )
Since
2021.07

Definition at line 66 of file TranslationPage.php.


The documentation for this class was generated from the following file: