jenkins-bot has submitted this change and it was merged. Change subject: Use group source language ......................................................................
Use group source language Instead of hard coded "en". Bug: 55607 Change-Id: I6ebb1cfeab3b5c065eb28e6d69a4329b2655b493 --- M scripts/createCheckIndex.php 1 file changed, 10 insertions(+), 8 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/scripts/createCheckIndex.php b/scripts/createCheckIndex.php index f88cb87..8ce7006 100644 --- a/scripts/createCheckIndex.php +++ b/scripts/createCheckIndex.php @@ -41,12 +41,6 @@ unset( $codes[$wgTranslateDocumentationLanguageCode] ); } - // Skip source language code - unset( $codes['en'] ); - - $codes = array_keys( $codes ); - sort( $codes ); - $reqGroups = $this->getOption( 'group' ); if ( $reqGroups ) { $reqGroups = explode( ',', $reqGroups ); @@ -61,6 +55,7 @@ /** @var $g MessageGroup */ foreach ( $groups as $g ) { $id = $g->getId(); + $sourceLanguage = $g->getSourceLanguage(); // Skip groups that are not requested if ( $reqGroups && !in_array( $id, $reqGroups ) ) { @@ -75,14 +70,21 @@ } // Initialise messages, using unique definitions if appropriate - $collection = $g->initCollection( 'en', true ); + $collection = $g->initCollection( $sourceLanguage, true ); if ( !count( $collection ) ) { continue; } $this->output( "Working with $id: ", $id ); - foreach ( $codes as $code ) { + // Skip source language code + $langCodes = $codes; + unset( $langCodes[$sourceLanguage] ); + + $langCodes = array_keys( $langCodes ); + sort( $langCodes ); + + foreach ( $langCodes as $code ) { $this->output( "$code ", $id ); $problematic = array(); -- To view, visit https://gerrit.wikimedia.org/r/89155 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ebb1cfeab3b5c065eb28e6d69a4329b2655b493 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@wikimedia.org> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits