From 4f60878f3119de08ba97a7bc5a1c7d4e0e8f1076 Mon Sep 17 00:00:00 2001 From: Eugene Kuligin Date: Mon, 20 Apr 2015 03:39:44 +0300 Subject: [PATCH] add localization support support for "Direct messages with" raw string --- js/twister_directmsg.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/twister_directmsg.js b/js/twister_directmsg.js index 1f32ce0..8705636 100644 --- a/js/twister_directmsg.js +++ b/js/twister_directmsg.js @@ -72,7 +72,7 @@ function requestDmConversation(dmConvo,dm_screenname) { if( since_id != undefined ) userDmReq[0].since_id = since_id; var count = 100; twisterRpc("getdirectmsgs", [defaultScreenName,count,userDmReq], - function(args, ret) { processDmConversation(args.dmConvo, args.dmUser, ret); }, + function(args, ret) { processDmConversation(args.dmConvo, args.dmUser, ret); }, {dmConvo:dmConvo,dmUser:dm_screenname}, function(arg, ret) { var msg = ("message" in ret) ? ret.message : ret; alert(polyglot.t("ajax_error", { error: msg })); }, null); @@ -121,11 +121,11 @@ function newDirectMsg(msg, dm_screenname) { } twisterRpc("newdirectmsg", paramsOpt, - function(arg, ret) { + function(arg, ret) { incLastPostId(); if( arg.copySelf ) incLastPostId(); }, {copySelf:copySelf}, - function(arg, ret) { + function(arg, ret) { // fallback for older twisterd (error: no copy_self parameter) twisterRpc("newdirectmsg", arg.paramsOrig, function(arg, ret) { incLastPostId(); }, null, @@ -185,7 +185,7 @@ function openDmWithUserModal(dm_screenname) $( retweetContent ).clone().appendTo( ".directMessages .modal-content" ).hide().fadeIn( "fast" ); var dmTitle = $( ".directMessages h3" ); - dmTitle.html("Direct messages with "); + dmTitle.html(polyglot.t("Direct messages with") + " "); dmTitle = dmTitle.find("span"); var dmConversation = $(".directMessages"); openDmConversation(dm_screenname, dmTitle, dmConversation); @@ -202,7 +202,7 @@ function initInterfaceDirectMsg() { $( ".userMenu-messages a" ).attr("href","#directmessages"); $( "#dm-snippet-template" ).bind( "click", function(){ - window.location.hash='#directmessages?user='+$(this).attr("data-dm-screen-name"); + window.location.hash='#directmessages?user='+$(this).attr("data-dm-screen-name"); } ); $( ".dm-submit").click( directMsgSubmit );