MediaWiki  1.29.2
LocalisationUpdate\Updater Class Reference

Executes the localisation update. More...

Public Member Functions

 execute (Finder $finder, ReaderFactory $readerFactory, FetcherFactory $fetcherFactory, array $repos)
 
 expandRemotePath ( $info, $repos)
 Expands repository relative path to full url with the given repository patterns. More...
 
 fetchFiles (FetcherFactory $factory, $path)
 Fetches files from given Url pattern. More...
 
 findChangedTranslations ( $origin, $remote, $blacklist=[])
 Find new and changed translations in $remote and returns them. More...
 
 isDirectory ( $path)
 Whether the path is a pattern and thus we need to use appropriate code for fetching directories. More...
 
 readMessages (ReaderFactory $readerFactory, array $files)
 Parses translations from given list of files. More...
 

Detailed Description

Executes the localisation update.

Definition at line 13 of file Updater.php.

Member Function Documentation

◆ execute()

LocalisationUpdate\Updater::execute ( Finder  $finder,
ReaderFactory  $readerFactory,
FetcherFactory  $fetcherFactory,
array  $repos 
)

Definition at line 126 of file Updater.php.

References as.

◆ expandRemotePath()

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.

Parameters
array$infoComponent information.
array$reposRepository information.
Returns
string

Definition at line 35 of file Updater.php.

References $keys, and as.

◆ fetchFiles()

LocalisationUpdate\Updater::fetchFiles ( FetcherFactory  $factory,
  $path 
)

Fetches files from given Url pattern.

Parameters
FetcherFactory$factoryFactory to construct fetchers.
string$pathUrl to the file or pattern of files.
Returns
array List of Urls with file contents as path.

Definition at line 113 of file Updater.php.

References $path.

◆ findChangedTranslations()

LocalisationUpdate\Updater::findChangedTranslations (   $origin,
  $remote,
  $blacklist = [] 
)

Find new and changed translations in $remote and returns them.

Parameters
array$origin
array$remote
array[$blacklist] Array of message keys to ignore, keys as as array keys.
Returns
array

Definition at line 92 of file Updater.php.

References $value, and as.

◆ isDirectory()

LocalisationUpdate\Updater::isDirectory (   $path)

Whether the path is a pattern and thus we need to use appropriate code for fetching directories.

Parameters
string$pathUrl
Returns
bool

Definition at line 21 of file Updater.php.

References $path.

◆ readMessages()

LocalisationUpdate\Updater::readMessages ( ReaderFactory  $readerFactory,
array  $files 
)

Parses translations from given list of files.

Parameters
ReaderFactory$readerFactoryFactory to construct parsers.
array$filesList of files with their contents as array values.
Returns
array List of translations indexed by language code.

Definition at line 57 of file Updater.php.

References $code, $e, $messages, as, and LocalisationUpdate\ReaderFactory\getReader().


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