r30988 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30987‎ | r30988 | r30989 >
Date:00:10, 16 February 2008
Author:siebrand
Status:old
Tags:
Comment:
Add 3 messages that could not yet be localised
Modified paths:
  • /trunk/extensions/AjaxShowEditors/AjaxShowEditors.i18n.php (modified) (history)
  • /trunk/extensions/AjaxShowEditors/Response.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AjaxShowEditors/AjaxShowEditors.i18n.php
@@ -8,10 +8,13 @@
99 $messages = array();
1010
1111 $messages['en'] = array(
12 - 'ajax-se-desc' => 'Shows editing users who is editing the same page',
13 - 'ajax-se-title' => 'Currently editing:',
14 - 'ajax-se-pending' => 'pending refresh ... (click this box or start editing)',
15 - 'ajax-se-idling' => '($1s ago)',
 12+ 'ajax-se-desc' => 'Shows editing users who is editing the same page',
 13+ 'ajax-se-title' => 'Currently editing:',
 14+ 'ajax-se-pending' => 'pending refresh ... (click this box or start editing)',
 15+ 'ajax-se-idling' => '($1s ago)',
 16+ 'ajax-se-pagedoesnotexist' => 'page does not exist',
 17+ 'ajax-se-userinvalid' => 'ERR: user invalid',
 18+ 'ajax-se-usernotfound' => 'ERR: user not found',
1619 );
1720
1821 /** Afrikaans (Afrikaans)
Index: trunk/extensions/AjaxShowEditors/Response.php
@@ -17,15 +17,17 @@
1818 global $wgOut;
1919 $articleId = intval($articleId);
2020
 21+ wfLoadExtensionMessages( 'AjaxShowEditors' );
 22+
2123 // Validate request
2224 $title = Title::newFromID( $articleId );
23 - if( !($title) ) { return 'ERR: page id invalid'; }
 25+ if( !($title) ) { return wfMsg( 'ajax-se-pagedoesnotexist' ); }
2426
2527 $user = User::newFromSession() ;
26 - if( !$user ) { return 'ERR: user invalid'; }
 28+ if( !$user ) { return wfMsg( 'ajax-se-userinvalid' ); }
2729
2830 $username = $user->getName();
29 - if( !( $user->isLoggedIn() or User::isIP( $username ) ) ) { return 'ERR: user not found'; }
 31+ if( !( $user->isLoggedIn() or User::isIP( $username ) ) ) { return wfMsg( 'ajax-se-usernotfound' ); }
3032
3133
3234 // When did the user started editing ?
@@ -98,7 +100,6 @@
99101 $editor->editings_user
100102 );
101103
102 - wfLoadExtensionMessages( 'AjaxShowEditors' );
103104 $wikitext .= ' ' . wfMsg( 'ajax-se-idling', '<span>'.$idle.'</span>' );
104105 }
105106 return $wikitext ;

Status & tagging log