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, User $user, MessageLocalizer $messageLocalizer, $group=null, string $code='en')
 
 getTitle ()
 Wrapper for consistency with SpecialPage.
 
 setTitle (Title $title)
 
 getUser ()
 
 setUser (User $user)
 
 getGroup ()
 
 setGroup ( $group)
 
 getCode ()
 
 setCode (string $code='en')
 
 execute (array $messages)
 

Static Public Member Functions

static doFuzzy (Title $title, string $message, string $comment, ?User $user, MessageLocalizer $messageLocalizer)
 
static makeSectionElement (string $legend, string $type, string $content, ?Language $lang=null)
 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 38 of file MessageWebImporter.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::__construct ( Title $title,
User $user,
MessageLocalizer $messageLocalizer,
$group = null,
string $code = 'en' )
Parameters
Title$title
User$user
MessageLocalizer$messageLocalizer
MessageGroup | string | null$group
string$code

Definition at line 56 of file MessageWebImporter.php.

Member Function Documentation

◆ allowProcess()

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

Definition at line 130 of file MessageWebImporter.php.

◆ checkProcessTime()

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

Definition at line 431 of file MessageWebImporter.php.

◆ doFooter()

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

Definition at line 126 of file MessageWebImporter.php.

◆ doFuzzy()

static MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::doFuzzy ( Title $title,
string $message,
string $comment,
?User $user,
MessageLocalizer $messageLocalizer )
static
Returns
string[]

Definition at line 470 of file MessageWebImporter.php.

◆ doHeader()

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

Definition at line 112 of file MessageWebImporter.php.

◆ execute()

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

Definition at line 148 of file MessageWebImporter.php.

◆ getAction()

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

Definition at line 108 of file MessageWebImporter.php.

◆ getActions()

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

Definition at line 140 of file MessageWebImporter.php.

◆ getCode()

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

Definition at line 100 of file MessageWebImporter.php.

◆ getGroup()

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

Definition at line 87 of file MessageWebImporter.php.

◆ getTitle()

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

Wrapper for consistency with SpecialPage.

Definition at line 71 of file MessageWebImporter.php.

◆ getUser()

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

Definition at line 79 of file MessageWebImporter.php.

◆ makeSectionElement()

static MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::makeSectionElement ( string $legend,
string $type,
string $content,
?Language $lang = null )
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.
Returns
string Section element as html.

Definition at line 574 of file MessageWebImporter.php.

◆ setCode()

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

Definition at line 104 of file MessageWebImporter.php.

◆ setGroup()

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

Definition at line 92 of file MessageWebImporter.php.

◆ setTitle()

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

Definition at line 75 of file MessageWebImporter.php.

◆ setUser()

MediaWiki\Extension\Translate\Synchronization\MessageWebImporter::setUser ( User $user)

Definition at line 83 of file MessageWebImporter.php.


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