r108810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108809‎ | r108810 | r108811 >
Date:14:18, 13 January 2012
Author:jeroendedauw
Status:ok (Comments)
Tags:
Comment:
plural in js messages
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)
  • /trunk/extensions/EducationProgram/resources/ep.pager.js (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -234,8 +234,8 @@
235235 // ep.pager
236236 'ep-pager-confirm-delete' => 'Are you sure you want to delete this item?',
237237 'ep-pager-delete-fail' => 'Could not delete this item.',
238 - 'ep-pager-confirm-delete-selected' => 'Are you sure you want to delete the selected items?',
239 - 'ep-pager-delete-selected-fail' => 'Could not delete the selected items.',
 238+ 'ep-pager-confirm-delete-selected' => 'Are you sure you want to delete the selected {{PLURAL:$1|item|items}}?',
 239+ 'ep-pager-delete-selected-fail' => 'Could not delete the selected {{PLURAL:$1|item|items}}.',
240240
241241 // Special:Institution
242242 'ep-institution-none' => 'There is no institution with name "$1". See [[Special:Institution|here]] for a list of institutions.',
Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -206,6 +206,7 @@
207207 ),
208208 'dependencies' => array(
209209 'ep.api',
 210+ 'mediawiki.jqueryMsg',
210211 ),
211212 'messages' => array(
212213 'ep-pager-confirm-delete',
Index: trunk/extensions/EducationProgram/resources/ep.pager.js
@@ -43,7 +43,7 @@
4444 }
4545 }
4646 else {
47 - alert( mw.msg( 'ep-pager-delete-fail' ) ); // TODO
 47+ alert( mw.msg( 'ep-pager-delete-fail' ) );
4848 }
4949 }
5050 );
@@ -65,7 +65,7 @@
6666 ids.push( $( element ).val() );
6767 } );
6868
69 - if ( ids.length < 1 || !confirm( mw.msg( 'ep-pager-confirm-delete-selected' ) ) ) {
 69+ if ( ids.length < 1 || !confirm( window.gM( 'ep-pager-confirm-delete-selected', ids.length ) ) ) {
7070 return;
7171 }
7272
@@ -93,7 +93,7 @@
9494 }
9595 }
9696 else {
97 - alert( mw.msg( 'ep-pager-delete-selected-fail' ) ); // TODO
 97+ alert( window.gM( 'ep-pager-delete-selected-fail', ids.length ) );
9898 }
9999 }
100100 );

Comments

#Comment by Siebrand (talk | contribs)   17:40, 13 January 2012

More yay!

Status & tagging log