MediaWiki REL1_31
|
Executes the localisation update. More...
Public Member Functions | |
execute (Finder $finder, ReaderFactory $readerFactory, FetcherFactory $fetcherFactory, array $repos, $logger) | |
expandRemotePath ( $info, $repos) | |
Expands repository relative path to full url with the given repository patterns. | |
fetchFiles (FetcherFactory $factory, $path) | |
Fetches files from given Url pattern. | |
findChangedTranslations ( $origin, $remote, $blacklist=[]) | |
Find new and changed translations in $remote and returns them. | |
isDirectory ( $path) | |
Whether the path is a pattern and thus we need to use appropriate code for fetching directories. | |
readMessages (ReaderFactory $readerFactory, array $files) | |
Parses translations from given list of files. | |
Executes the localisation update.
Definition at line 13 of file Updater.php.
LocalisationUpdate\Updater::execute | ( | Finder | $finder, |
ReaderFactory | $readerFactory, | ||
FetcherFactory | $fetcherFactory, | ||
array | $repos, | ||
$logger ) |
Definition at line 126 of file Updater.php.
References $e.
LocalisationUpdate\Updater::expandRemotePath | ( | $info, | |
$repos ) |
Expands repository relative path to full url with the given repository patterns.
Extra variables in $info are used as variables and will be replaced the pattern.
array | $info | Component information. |
array | $repos | Repository information. |
Definition at line 35 of file Updater.php.
References $keys.
LocalisationUpdate\Updater::fetchFiles | ( | FetcherFactory | $factory, |
$path ) |
Fetches files from given Url pattern.
FetcherFactory | $factory | Factory to construct fetchers. |
string | $path | Url to the file or pattern of files. |
Definition at line 113 of file Updater.php.
References LocalisationUpdate\FetcherFactory\getFetcher().
LocalisationUpdate\Updater::findChangedTranslations | ( | $origin, | |
$remote, | |||
$blacklist = [] ) |
Find new and changed translations in $remote and returns them.
array | $origin | |
array | $remote | |
array | $blacklist | Array of message keys to ignore, keys as as array keys. |
Definition at line 92 of file Updater.php.
References $value.
LocalisationUpdate\Updater::isDirectory | ( | $path | ) |
Whether the path is a pattern and thus we need to use appropriate code for fetching directories.
string | $path | Url |
Definition at line 21 of file Updater.php.
LocalisationUpdate\Updater::readMessages | ( | ReaderFactory | $readerFactory, |
array | $files ) |
Parses translations from given list of files.
ReaderFactory | $readerFactory | Factory to construct parsers. |
array | $files | List of files with their contents as array values. |
Definition at line 57 of file Updater.php.