Siebrand has uploaded a new change for review.

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


Change subject: (bug 45115) Only export languages that can be translated
......................................................................

(bug 45115) Only export languages that can be translated

Change-Id: I118911ca62708b32ce3576fd8f3ba7746008a9a0
---
M scripts/export.php
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/20/49620/1

diff --git a/scripts/export.php b/scripts/export.php
index 4c901cb..04f1a01 100644
--- a/scripts/export.php
+++ b/scripts/export.php
@@ -223,11 +223,18 @@
                        $definitionFile = str_replace( $wgTranslateGroupRoot, 
$options['ppgettext'], $path );
                }
 
+               $translatebleLanguages = $group->getTranslatableLanguages();
+
                foreach ( $langs as $lang ) {
                        if ( !$group->isValidLanguage( $lang ) ) {
                                continue;
                        }
 
+                       // Do not export languges that are blacklisted (or not 
whitelisted)
+                       if( !in_array( $lang, $translatebleLanguages ) ) {
+                               continue;
+                       }
+
                        $collection->resetForNewLanguage( $lang );
                        $collection->loadTranslations();
                        // Don't export ignored, unless it is the source 
language

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I118911ca62708b32ce3576fd8f3ba7746008a9a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to