1
0
Fork 0
mirror of https://bitbucket.org/vertlach/iusethis.git synced 2024-06-17 07:30:50 +03:00

English version hooray

This commit is contained in:
Alexander Yakovlev 2017-01-18 19:31:29 +07:00
parent da278d02c2
commit 111fd984ce

15
IUT.js
View file

@ -16,6 +16,13 @@ var IUT = function IUT() {
this.id = 0; this.id = 0;
this.last_id = 0; this.last_id = 0;
this.imagePath = mw.config.get( 'wgExtensionAssetsPath' ) + '/VoteNY/images/'; 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 * Called when voting through the green square voting box
@ -30,9 +37,9 @@ var IUT = function IUT() {
what: 'vote', what: 'vote',
pageId: PageID pageId: PageID
} ).done( function( data ) { } ).done( function( data ) {
$( '#PollVotes' ).html( data.iusethis.result ); $( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html( $( '#Answer' ).html(
'<a href="javascript:void(0);" class="vote-unvote-link">' + ' <a href="javascript:void(0);" class="vote-unvote-link">' +
mw.msg( 'iusethis-unvote-link' ) + '</a>' mw.msg( 'iusethis-unvote-link' ) + '</a>'
); );
} ); } );
@ -50,9 +57,9 @@ var IUT = function IUT() {
what: 'delete', what: 'delete',
pageId: PageID pageId: PageID
} ).done( function( data ) { } ).done( function( data ) {
$( '#PollVotes' ).html( data.iusethis.result ); $( '#PollVotes' ).html( data.iusethis.result + ' ' + mw.msg('people-count') );
$( '#Answer' ).html( $( '#Answer' ).html(
'<a href="javascript:void(0);" class="vote-vote-link">' + ' <a href="javascript:void(0);" class="vote-vote-link">' +
mw.msg( 'iusethis-link' ) + '</a>' mw.msg( 'iusethis-link' ) + '</a>'
); );
} ); } );