Finds external changes for file based message groups. More...
Public Member Functions | |
__construct (StringComparator $stringComparator, RevisionLookup $revisionLookup, PageStore $pageStore) | |
processGroup (FileBasedMessageGroup $group) | |
Finds modifications in external sources compared to wiki state. | |
Protected Member Functions | |
addMessageUpdateChanges (FileBasedMessageGroup $group, string $language, MessageSourceChange $changes, int $reason, MessageGroupCache $cache) | |
This is the detective novel. | |
Finds external changes for file based message groups.
Definition at line 26 of file ExternalMessageSourceStateComparator.php.
MediaWiki\Extension\Translate\Synchronization\ExternalMessageSourceStateComparator::__construct | ( | StringComparator | $stringComparator, |
RevisionLookup | $revisionLookup, | ||
PageStore | $pageStore ) |
Definition at line 31 of file ExternalMessageSourceStateComparator.php.
|
protected |
This is the detective novel.
We have three sources of information:
Now we must try to guess what in earth has driven the file state and wiki state out of sync. Then we must compile list of events that would bring those to sync. Types of events are addition, deletion, (content) change and key renames. After that the list of events are stored for later processing of a translation administrator, who can decide what actions to take on those events to bring the state more or less in sync.
RuntimeException |
Definition at line 112 of file ExternalMessageSourceStateComparator.php.
MediaWiki\Extension\Translate\Synchronization\ExternalMessageSourceStateComparator::processGroup | ( | FileBasedMessageGroup | $group | ) |
Finds modifications in external sources compared to wiki state.
The MessageSourceChange object returned stores the following about each modification,
Definition at line 59 of file ExternalMessageSourceStateComparator.php.