diff --git a/IUT.js b/IUT.js
index 3f4e155..393f001 100644
--- a/IUT.js
+++ b/IUT.js
@@ -16,6 +16,13 @@ var IUT = function IUT() {
this.id = 0;
this.last_id = 0;
this.imagePath = mw.config.get( 'wgExtensionAssetsPath' ) + '/VoteNY/images/';
+ $.when( mw.loader.using( [ 'mediawiki.api.messages', 'mediawiki.jqueryMsg' ] ), $.ready ).then( function() {
+ return new mw.Api().loadMessagesIfMissing( [
+ 'iusethis-unvote-link',
+ 'iusethis-link',
+ 'people-count'
+ ] );
+ })
/**
* Called when voting through the green square voting box
@@ -30,9 +37,9 @@ var IUT = function IUT() {
what: 'vote',
pageId: PageID
} ).done( function( data ) {
- $( '#PollVotes' ).html( data.iusethis.result );
+ $( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html(
- '' +
+ ' ' +
mw.msg( 'iusethis-unvote-link' ) + ''
);
} );
@@ -50,9 +57,9 @@ var IUT = function IUT() {
what: 'delete',
pageId: PageID
} ).done( function( data ) {
- $( '#PollVotes' ).html( data.iusethis.result );
+ $( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html(
- '' +
+ ' ' +
mw.msg( 'iusethis-link' ) + ''
);
} );