Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\Synchronization\MessageWebImporter Class Reference

Class which encapsulates message importing. More...

Public Member Functions

 __construct (Title $title, private readonly IContextSource $context, $group=null, string $code='en')
 
 getTitle ()
 Wrapper for consistency with SpecialPage.
 
 setTitle (Title $title)
 
 getGroup ()
 
 setGroup ( $group)
 
 getCode ()
 
 setCode (string $code='en')
 
 execute (array $messages)
 

Static Public Member Functions

static makeSectionElement (string $legend, string $type, string $content, ?Language $lang=null, array $extraContainerClasses=[])
 Make section elements.
 

Protected Member Functions

 getAction ()
 
 doHeader ()
 
 doFooter ()
 
 allowProcess ()
 
 getActions ()
 
 checkProcessTime ()
 

Detailed Description

Class which encapsulates message importing.

It scans for changes (new, changed, deleted), displays them in pretty way with diffs and finally executes the actions the user choices.

Author
Niklas Laxström
Siebrand Mazeland

Definition at line 34 of file MessageWebImporter.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::__construct ( Title $title,
private readonly IContextSource $context,
$group = null,
string $code = 'en' )
Parameters
Title$titleThe title to send the user to when they submit the form; this may or may not be the title of $context (e.g. the special page subpage may be removed from it)
IContextSource$context
MessageGroup | string | null$group
string$code

Definition at line 51 of file MessageWebImporter.php.

Member Function Documentation

◆ allowProcess()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::allowProcess ( )
protected

Definition at line 116 of file MessageWebImporter.php.

◆ checkProcessTime()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::checkProcessTime ( )
protected

Definition at line 416 of file MessageWebImporter.php.

◆ doFooter()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::doFooter ( )
protected

Definition at line 112 of file MessageWebImporter.php.

◆ doHeader()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::doHeader ( )
protected

Definition at line 98 of file MessageWebImporter.php.

◆ execute()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::execute ( array $messages)

Definition at line 133 of file MessageWebImporter.php.

◆ getAction()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::getAction ( )
protected

Definition at line 94 of file MessageWebImporter.php.

◆ getActions()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::getActions ( )
protected

Definition at line 125 of file MessageWebImporter.php.

◆ getCode()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::getCode ( )

Definition at line 86 of file MessageWebImporter.php.

◆ getGroup()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::getGroup ( )

Definition at line 71 of file MessageWebImporter.php.

◆ getTitle()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::getTitle ( )

Wrapper for consistency with SpecialPage.

Definition at line 63 of file MessageWebImporter.php.

◆ makeSectionElement()

static MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::makeSectionElement ( string $legend,
string $type,
string $content,
?Language $lang = null,
array $extraContainerClasses = [] )
static

Make section elements.

Parameters
string$legendLegend as raw html.
string$typeContents of type class.
string$contentContents as raw html.
Language | null$langThe language in which the text is written.
string[]$extraContainerClassesAdditional classes to add to the section container
Returns
string Section element as html.

Definition at line 537 of file MessageWebImporter.php.

◆ setCode()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::setCode ( string $code = 'en')

Definition at line 90 of file MessageWebImporter.php.

◆ setGroup()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::setGroup ( $group)
Parameters
MessageGroup | string$groupMessageGroup object or group ID

Definition at line 76 of file MessageWebImporter.php.

◆ setTitle()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::setTitle ( Title $title)

Definition at line 67 of file MessageWebImporter.php.


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