Index: trunk/extensions/Push/Push.i18n.php |
— | — | @@ -40,9 +40,10 @@ |
41 | 41 | 'push-remote-pages' => 'Remote pages', |
42 | 42 | 'push-remote-page-link' => '$1 on $2', |
43 | 43 | '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}}.', |
45 | 45 | 'push-button-all' => 'Push all', |
46 | 46 | 'push-tab-last-edit' => 'Last edit by $1 on $2 at $3.', |
| 47 | + 'push-tab-not-created' => 'This page does not exist yet.', |
47 | 48 | |
48 | 49 | // Special page |
49 | 50 | 'special-push' => 'Push pages', |
Index: trunk/extensions/Push/Push.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | 'push-special-push-done', |
79 | 79 | 'push-err-captacha', |
80 | 80 | 'push-tab-last-edit', |
| 81 | + 'push-tab-not-created', |
81 | 82 | ); |
82 | 83 | |
83 | 84 | // For backward compatibility with MW < 1.17. |
Index: trunk/extensions/Push/includes/ext.push.tab.js |
— | — | @@ -59,21 +59,29 @@ |
60 | 60 | }, |
61 | 61 | function( data ) { |
62 | 62 | if ( data.query ) { |
| 63 | + var infoDiv = $( '#targetinfo' + targetId ); |
| 64 | + |
63 | 65 | for ( first in data.query.pages ) break; |
| 66 | + |
64 | 67 | if ( first == '-1' ) { |
65 | 68 | $( '#targetlink' + targetId ).attr( {'class': 'new'} ); |
| 69 | + var message = mediaWiki.msg( 'push-tab-not-created' ); |
66 | 70 | } |
67 | 71 | else { |
68 | 72 | var revision = data.query.pages[first].revisions[0]; |
69 | 73 | var dateTime = revision.timestamp.split( 'T' ); |
70 | | - $( '#targetinfo' + targetId ).css( 'color', 'darkgray' ); |
71 | | - $( '#targetinfo' + targetId ).text( mediaWiki.msg( |
| 74 | + |
| 75 | + var message = mediaWiki.msg( |
72 | 76 | 'push-tab-last-edit', |
73 | 77 | revision.user, |
74 | 78 | dateTime[0], |
75 | 79 | dateTime[1].replace( 'Z', '' ) |
76 | | - ) ).fadeIn('slow'); |
| 80 | + ); |
77 | 81 | } |
| 82 | + |
| 83 | + infoDiv.css( 'color', 'darkgray' ); |
| 84 | + infoDiv.text( message ); |
| 85 | + infoDiv.fadeIn( 'slow' ); |
78 | 86 | } |
79 | 87 | } |
80 | 88 | ); |