Index: trunk/extensions/Translate/tag/PageTranslationHooks.php |
— | — | @@ -225,6 +225,7 @@ |
226 | 226 | |
227 | 227 | // This way the parser knows to fragment the parser cache by language code |
228 | 228 | $userLangCode = $parser->getOptions()->getUserLang(); |
| 229 | + $sourceLanguage = $page->getMessageGroup()->getSourceLanguage(); |
229 | 230 | |
230 | 231 | $languages = array(); |
231 | 232 | foreach ( $status as $code => $percent ) { |
— | — | @@ -249,8 +250,7 @@ |
250 | 251 | ) ); |
251 | 252 | |
252 | 253 | // Add links to other languages |
253 | | - // @FIXME: 'en' should be the source language, not hardcoded |
254 | | - $suffix = ( $code === 'en' ) ? '' : "/$code"; |
| 254 | + $suffix = ( $code === $sourceLanguage ) ? '' : "/$code"; |
255 | 255 | $_title = Title::makeTitle( $title->getNamespace(), $title->getDBkey() . $suffix ); |
256 | 256 | if ( intval( $percent ) === 0 ) { |
257 | 257 | /* When language is included because it is a priority language, |