r54421 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54420‎ | r54421 | r54422 >
Date:02:38, 5 August 2009
Author:purodha
Status:ok
Tags:
Comment:
Fix typo, make figureMessage work correctly when called without a language code.
Modified paths:
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -231,8 +231,15 @@
232232 private static function figureMessage( Title $title ) {
233233 $text = $title->getDBkey();
234234 $pos = strrpos( $text, '/' );
235 - $code = substr( $text, $pos + 1 );
236 - $key = substr( $text, 0, $pos );
 235+ {
 236+ $code = '';
 237+ $key = $text;
 238+ }
 239+ else
 240+ {
 241+ $code = substr( $text, $pos + 1 );
 242+ $key = substr( $text, 0, $pos );
 243+ }
237244 return array( $key, $code );
238245 }
239246
@@ -243,7 +250,7 @@
244251 }
245252
246253 /**
247 - * Tries to determine from which group this message belongs. It tries to get
 254+ * Tries to determine to which group this message belongs. It tries to get
248255 * group id from loadgroup GET-paramater, but fallbacks to messageIndex file
249256 * if no valid group was provided, or the group provided is a meta group.
250257 * @param $key The message key we are interested in.

Follow-up revisions

RevisionCommit summaryAuthorDate
r54430Fix error in r54421purodha05:49, 5 August 2009

Status & tagging log