r78197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78196‎ | r78197 | r78198 >
Date:16:14, 10 December 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Small fixes
Modified paths:
  • /trunk/extensions/Push/Push.i18n.php (modified) (history)
  • /trunk/extensions/Push/Push.php (modified) (history)
  • /trunk/extensions/Push/includes/ext.push.tab.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Push/Push.i18n.php
@@ -40,9 +40,10 @@
4141 'push-remote-pages' => 'Remote pages',
4242 'push-remote-page-link' => '$1 on $2',
4343 'push-remote-page-link-full' => 'View $1 on $2',
44 - 'push-targets-total' => 'There a total of $1 {{PLURAL:$1|target|targets}}.',
 44+ 'push-targets-total' => 'There are a total of $1 {{PLURAL:$1|target|targets}}.',
4545 'push-button-all' => 'Push all',
4646 'push-tab-last-edit' => 'Last edit by $1 on $2 at $3.',
 47+ 'push-tab-not-created' => 'This page does not exist yet.',
4748
4849 // Special page
4950 'special-push' => 'Push pages',
Index: trunk/extensions/Push/Push.php
@@ -77,6 +77,7 @@
7878 'push-special-push-done',
7979 'push-err-captacha',
8080 'push-tab-last-edit',
 81+ 'push-tab-not-created',
8182 );
8283
8384 // For backward compatibility with MW < 1.17.
Index: trunk/extensions/Push/includes/ext.push.tab.js
@@ -59,21 +59,29 @@
6060 },
6161 function( data ) {
6262 if ( data.query ) {
 63+ var infoDiv = $( '#targetinfo' + targetId );
 64+
6365 for ( first in data.query.pages ) break;
 66+
6467 if ( first == '-1' ) {
6568 $( '#targetlink' + targetId ).attr( {'class': 'new'} );
 69+ var message = mediaWiki.msg( 'push-tab-not-created' );
6670 }
6771 else {
6872 var revision = data.query.pages[first].revisions[0];
6973 var dateTime = revision.timestamp.split( 'T' );
70 - $( '#targetinfo' + targetId ).css( 'color', 'darkgray' );
71 - $( '#targetinfo' + targetId ).text( mediaWiki.msg(
 74+
 75+ var message = mediaWiki.msg(
7276 'push-tab-last-edit',
7377 revision.user,
7478 dateTime[0],
7579 dateTime[1].replace( 'Z', '' )
76 - ) ).fadeIn('slow');
 80+ );
7781 }
 82+
 83+ infoDiv.css( 'color', 'darkgray' );
 84+ infoDiv.text( message );
 85+ infoDiv.fadeIn( 'slow' );
7886 }
7987 }
8088 );

Status & tagging log