40 foreach ( $this->json as $key => $value ) {
41 foreach ( (array)$value as $subkey => $subvalue ) {
44 if ( preg_match(
'~/(?P<path>(?:includes|languages|resources)/.*)$~', $subvalue,
$matches ) ) {
45 $components[
"$key-$subkey"] = [
46 'repo' =>
'mediawiki',
47 'orig' =>
"file://$value/*.json",
48 'path' =>
"{$matches['path']}/*.json",
53 $item = $this->getItem(
'extensions', $subvalue );
54 if ( $item !==
null ) {
55 $item[
'repo'] =
'extension';
56 $components[
"$key-$subkey"] = $item;
60 $item = $this->getItem(
'skins', $subvalue );
61 if ( $item !==
null ) {
62 $item[
'repo'] =
'skin';
63 $components[
"$key-$subkey"] = $item;
77 private function getItem( $dir, $subvalue ) {
80 if ( !preg_match(
"~/$dir/(?P<name>[^/]+)/(?P<path>.*)$~", $subvalue,
$matches ) ) {
86 'orig' =>
"file://$subvalue/*.json",
87 'path' =>
"{$matches['path']}/*.json",
Interface for classes which provide list of components, which should be included for l10n updates.
__construct( $json, $core)
getItem( $dir, $subvalue)