|
const | ALL_LANGUAGES = 'all languages' |
| Process all languages supported by the message group.
|
|
◆ __construct()
ExternalMessageSourceStateComparator::__construct |
( |
StringComparator | $stringComparator | ) |
|
◆ addMessageUpdateChanges()
This is the detective novel.
We have three sources of information:
- current message state in the file
- current message state in the wiki
- cached message state since cache was last build (usually after export from wiki)
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.
- Parameters
-
- Exceptions
-
Definition at line 123 of file ExternalMessageSourceStateComparator.php.
◆ processGroup()
Finds modifications in external sources compared to wiki state.
The MessageSourceChange object returned stores the following about each modification,
- First level of classification is the language code
- Second level of classification is the type of modification,
- addition (new message in the file)
- deletion (message in wiki not present in the file)
- change (difference in content)
- rename (message key is modified)
- Third level is a list of modifications
- For each modification, the following is saved,
- key (the message key)
- content (the message content in external source, null for deletions)
- matched_to (present in case of renames, key of the matched message)
- similarity (present in case of renames, similarity % with the matched message)
- previous_state (present in case of renames, state of the message before rename)
- Parameters
-
- Exceptions
-
- Returns
- MessageSourceChange
Definition at line 49 of file ExternalMessageSourceStateComparator.php.
◆ processLanguage()
◆ $stringComparator
ExternalMessageSourceStateComparator::$stringComparator |
|
protected |
◆ ALL_LANGUAGES
const ExternalMessageSourceStateComparator::ALL_LANGUAGES = 'all languages' |
The documentation for this class was generated from the following file: