Nikerabbit has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/197279

Change subject: Add code to handle core i18n locations
......................................................................

Add code to handle core i18n locations

Includes core, api and oojs-ui but not installer.

Bug: T92823
Change-Id: I8fc48b0d23d37a2cc147d4f8e7ebf4ed4764c4a9
---
M finder/Finder.php
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LocalisationUpdate 
refs/changes/79/197279/1

diff --git a/finder/Finder.php b/finder/Finder.php
index 4f69a56..c9533a3 100644
--- a/finder/Finder.php
+++ b/finder/Finder.php
@@ -41,6 +41,17 @@
                        unset( $this->php[$key] );
 
                        foreach ( (array)$value as $subkey => $subvalue ) {
+                               // Mediawiki core files
+                               $matches = array();
+                               if ( preg_match( 
'~/(?P<path>(?:includes|languages|resources)/.*)$~', $value, $matches ) ) {
+                                       $components["$key-$subkey"] = array(
+                                               'repo' => 'mediawiki',
+                                               'orig' => "file://$value",
+                                               'path' => $matches['path'],
+                                       );
+                                       continue;
+                               }
+
                                $item = $this->getItem( 'extensions', $subvalue 
);
                                if ( $item !== null ) {
                                        $item['repo'] = 'extension';
@@ -52,12 +63,12 @@
                                if ( $item !== null ) {
                                        $item['repo'] = 'skin';
                                        $components["$key-$subkey"] = $item;
+                                       continue;
                                }
                        }
                }
 
                foreach ( $this->php as $key => $value ) {
-                       // This currently skips core i18n files like 
resources/oojs-ui/i18n
                        $matches = array();
                        $ok = preg_match( 
'~/extensions/(?P<name>[^/]+)/(?P<path>.*\.i18n\.php)$~', $value, $matches );
                        if ( !$ok ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/197279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8fc48b0d23d37a2cc147d4f8e7ebf4ed4764c4a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LocalisationUpdate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to