https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112472
Revision: 112472
Author: santhosh
Date: 2012-02-27 05:31:42 +0000 (Mon, 27 Feb 2012)
Log Message:
-----------
If the prioritylangs set, show those languages alone.
(i18n #612)
Modified Paths:
--------------
trunk/extensions/Translate/tag/PageTranslationHooks.php
Modified: trunk/extensions/Translate/tag/PageTranslationHooks.php
===================================================================
--- trunk/extensions/Translate/tag/PageTranslationHooks.php 2012-02-27
05:27:20 UTC (rev 112471)
+++ trunk/extensions/Translate/tag/PageTranslationHooks.php 2012-02-27
05:31:42 UTC (rev 112472)
@@ -194,7 +194,15 @@
if ( !$status ) {
return '';
}
-
+ // If the prioritylangs set, show those languages alone.
+ $priorityLangs = TranslateMetadata::get(
$page->getMessageGroupId(), 'prioritylangs' );
+ $filter = null;
+ if( strlen( $priorityLangs ) > 0 ) {
+ $filter = explode( ',', $priorityLangs );
+ }
+ if ( $filter != null) {
+ $status = array_intersect_key( $status, array_flip(
$filter ) );
+ }
// Fix title
$title = $page->getTitle();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs