https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113914

Revision: 113914
Author:   nikerabbit
Date:     2012-03-15 14:14:59 +0000 (Thu, 15 Mar 2012)
Log Message:
-----------
Fixing this fixme since it was reported as bug in twn

Modified Paths:
--------------
    trunk/extensions/Translate/tag/PageTranslationHooks.php

Modified: trunk/extensions/Translate/tag/PageTranslationHooks.php
===================================================================
--- trunk/extensions/Translate/tag/PageTranslationHooks.php     2012-03-15 
13:37:42 UTC (rev 113913)
+++ trunk/extensions/Translate/tag/PageTranslationHooks.php     2012-03-15 
14:14:59 UTC (rev 113914)
@@ -225,6 +225,7 @@
 
                // This way the parser knows to fragment the parser cache by 
language code
                $userLangCode = $parser->getOptions()->getUserLang();
+               $sourceLanguage = $page->getMessageGroup()->getSourceLanguage();
 
                $languages = array();
                foreach ( $status as $code => $percent ) {
@@ -249,8 +250,7 @@
                        ) );
 
                        // Add links to other languages
-                       // @FIXME: 'en' should be the source language, not 
hardcoded
-                       $suffix = ( $code === 'en' ) ? '' : "/$code";
+                       $suffix = ( $code === $sourceLanguage ) ? '' : "/$code";
                        $_title = Title::makeTitle( $title->getNamespace(), 
$title->getDBkey() . $suffix );
                        if ( intval( $percent ) === 0 ) {
                                /* When language is included because it is a 
priority language,


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

Reply via email to