Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore Class Reference

Class to manage revision tags for translatable bundles. More...

Public Member Functions

 __construct (IConnectionProvider $connectionProvider)
 
 replaceTag (PageIdentity $identity, string $tag, int $revisionId, ?array $value=null)
 Add tag for the given revisionId, while deleting it from others.
 
 getLatestRevisionWithTag (PageIdentity $identity, string $tag)
 
 getLatestRevisionsForTags (PageIdentity $identity, string ... $tags)
 
 removeTags (PageIdentity $identity, string ... $tag)
 

Static Public Member Functions

static getTranslatableBundleIds (string ... $revTags)
 Get a list of page ids where the latest revision is either tagged or marked.
 

Public Attributes

const FUZZY_TAG = 'fuzzy'
 Indicates that a translation is fuzzy (outdated or not passing validation).
 
const TRANSVER_PROP = 'tp:transver'
 Stores the revision id of the source text which was translated.
 
const TP_MARK_TAG = 'tp:mark'
 Indicates a revision of a page that can be marked for translation.
 
const TP_READY_TAG = 'tp:tag'
 Indicates a revision of a translatable page that is marked for translation.
 
const MB_VALID_TAG = 'mb:valid'
 Indicates a revision of a page that is a valid message bundle.
 

Detailed Description

Class to manage revision tags for translatable bundles.

Author
Abijeet Patro
Niklas Laxström
Since
2022.04 @license GPL-2.0-or-later

Definition at line 17 of file RevTagStore.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::__construct ( IConnectionProvider $connectionProvider)

Definition at line 35 of file RevTagStore.php.

Member Function Documentation

◆ getLatestRevisionsForTags()

MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getLatestRevisionsForTags ( PageIdentity $identity,
string ... $tags )
Returns
null|int[]

Definition at line 75 of file RevTagStore.php.

◆ getLatestRevisionWithTag()

MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getLatestRevisionWithTag ( PageIdentity $identity,
string $tag )

Definition at line 69 of file RevTagStore.php.

◆ getTranslatableBundleIds()

static MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getTranslatableBundleIds ( string ... $revTags)
static

Get a list of page ids where the latest revision is either tagged or marked.

Definition at line 136 of file RevTagStore.php.

◆ removeTags()

MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::removeTags ( PageIdentity $identity,
string ... $tag )

Definition at line 118 of file RevTagStore.php.

◆ replaceTag()

MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::replaceTag ( PageIdentity $identity,
string $tag,
int $revisionId,
?array $value = null )

Add tag for the given revisionId, while deleting it from others.

Definition at line 40 of file RevTagStore.php.

Member Data Documentation

◆ FUZZY_TAG

const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::FUZZY_TAG = 'fuzzy'

Indicates that a translation is fuzzy (outdated or not passing validation).

Definition at line 19 of file RevTagStore.php.

◆ MB_VALID_TAG

const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::MB_VALID_TAG = 'mb:valid'

Indicates a revision of a page that is a valid message bundle.

Definition at line 29 of file RevTagStore.php.

◆ TP_MARK_TAG

const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::TP_MARK_TAG = 'tp:mark'

Indicates a revision of a page that can be marked for translation.

Definition at line 25 of file RevTagStore.php.

◆ TP_READY_TAG

const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::TP_READY_TAG = 'tp:tag'

Indicates a revision of a translatable page that is marked for translation.

Definition at line 27 of file RevTagStore.php.

◆ TRANSVER_PROP

const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::TRANSVER_PROP = 'tp:transver'

Stores the revision id of the source text which was translated.

Used for showing diffs for outdated messages.

Definition at line 23 of file RevTagStore.php.


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