r54660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54659‎ | r54660 | r54661 >
Date:14:21, 9 August 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
* Don't fail for site messages (messages without language code)
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)
  • /trunk/extensions/Translate/TranslateUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -272,7 +272,6 @@
273273 }
274274
275275 private static function editBoxes( $object ) {
276 - wfLoadExtensionMessages( 'Translate' );
277276 global $wgTranslateDocumentationLanguageCode, $wgOut, $wgRequest;
278277
279278 list( $key, $code, $group ) = self::getKeyCodeGroup( $object->mTitle );
Index: trunk/extensions/Translate/TranslateUtils.php
@@ -26,7 +26,11 @@
2727 if ( !isset( $cache[$message] ) ) {
2828 $cache[$message] = $wgContLang->ucfirst( $message );
2929 }
30 - return $cache[$message] . '/' . $code;
 30+ if ( $code ) {
 31+ return $cache[$message] . '/' . $code;
 32+ } else {
 33+ return $cache[$message];
 34+ }
3135 }
3236
3337 public static function figureMessage( $text ) {

Status & tagging log