r32156 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32155‎ | r32156 | r32157 >
Date:09:00, 19 March 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* untranslated is now the default task
* truncate very long message names in table view
Modified paths:
  • /trunk/extensions/Translate/README (modified) (history)
  • /trunk/extensions/Translate/TranslatePage.php (modified) (history)
  • /trunk/extensions/Translate/TranslateUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslatePage.php
@@ -93,7 +93,7 @@
9494 global $wgUser, $wgRequest;
9595
9696 $defaults = array(
97 - /* str */ 'task' => 'view',
 97+ /* str */ 'task' => 'untranslated',
9898 /* str */ 'sort' => 'normal',
9999 /* str */ 'language' => $wgUser->getOption( 'language' ),
100100 /* str */ 'group' => 'core',
Index: trunk/extensions/Translate/README
@@ -37,6 +37,8 @@
3838 * (bug 12955) Numbers should be localized in Translate extension
3939 * Support branches for core messages
4040 * fuzzy.php got support for --comment and --skiplanguages
 41+* untranslated is now the default task
 42+* truncate very long message names in table view
4143
4244 == Changes in version 8 ==
4345 * Released 2008-02-06
Index: trunk/extensions/Translate/TranslateUtils.php
@@ -240,10 +240,12 @@
241241 $original = $m->definition;
242242 $message = $m->translation ? $m->translation : $original;
243243
 244+ global $wgLang;
 245+ $niceTitle = $wgLang->truncate( $key, -30, '…' );
244246 if( $m->pageExists ) {
245 - $page['link'] = $sk->makeKnownLinkObj( $page['object'], htmlspecialchars( $key ) );
 247+ $page['link'] = $sk->makeKnownLinkObj( $page['object'], htmlspecialchars( $niceTitle ) );
246248 } else {
247 - $page['link'] = $sk->makeBrokenLinkObj( $page['object'], htmlspecialchars( $key ) );
 249+ $page['link'] = $sk->makeBrokenLinkObj( $page['object'], htmlspecialchars( $niceTitle ) );
248250 }
249251 if( $m->talkExists ) {
250252 $talk['link'] = $sk->makeKnownLinkObj( $talk['object'], $uimsg['talk'] );

Status & tagging log