Class to manage revision tags for translatable bundles. More...
Public Member Functions | |
| __construct (IConnectionProvider $dbProvider) | |
| 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) | |
| isRevIdFuzzy (int $articleId, int $revisionId) | |
| getTransver (PageIdentity $identity, ?int $revid=null) | |
| Get the revision ID of the original message that was live the last time a non-fuzzy translation was saved (presumably the version whose translation the translation is). | |
| setTransver (PageIdentity $identity, int $translationRevision, int $transver) | |
| Sets the tp:transver revtag of the given page/revision. | |
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 corresponding source text. | |
| 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. | |
Class to manage revision tags for translatable bundles.
Definition at line 18 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::__construct | ( | IConnectionProvider | $dbProvider | ) |
Definition at line 33 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getLatestRevisionsForTags | ( | PageIdentity | $identity, |
| string ... | $tags ) |
Definition at line 81 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getLatestRevisionWithTag | ( | PageIdentity | $identity, |
| string | $tag ) |
Definition at line 75 of file RevTagStore.php.
|
static |
Get a list of page ids where the latest revision is either tagged or marked.
Definition at line 223 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::getTransver | ( | PageIdentity | $identity, |
| ?int | $revid = null ) |
Get the revision ID of the original message that was live the last time a non-fuzzy translation was saved (presumably the version whose translation the translation is).
Used to determine whether the translation is outdated and to show a diff of the original message if it is.
If a revision ID argument is specified, then ignore all versions after that revision ID in the above calculation.
null if none is found Definition at line 172 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::isRevIdFuzzy | ( | int | $articleId, |
| int | $revisionId ) |
Definition at line 144 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::removeTags | ( | PageIdentity | $identity, |
| string ... | $tag ) |
Definition at line 124 of file RevTagStore.php.
| 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 38 of file RevTagStore.php.
| MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::setTransver | ( | PageIdentity | $identity, |
| int | $translationRevision, | ||
| int | $transver ) |
Sets the tp:transver revtag of the given page/revision.
This normally represents the last time a non-fuzzy translation was saved (presumably the version whose translation the translation is). and is used to determine whether the translation is outdated and to show a diff of the original message if it is.
null if none is found Definition at line 205 of file RevTagStore.php.
| const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::FUZZY_TAG = 'fuzzy' |
Indicates that a translation is fuzzy (outdated or not passing validation).
Definition at line 20 of file RevTagStore.php.
| 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 28 of file RevTagStore.php.
| 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 24 of file RevTagStore.php.
| 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 26 of file RevTagStore.php.
| const MediaWiki\Extension\Translate\MessageGroupProcessing\RevTagStore::TRANSVER_PROP = 'tp:transver' |
Stores the revision id of the corresponding source text.
Used for showing diffs for outdated messages.
Definition at line 22 of file RevTagStore.php.