Fixes typo in translation module interface.

This commit is contained in:
hristoterezov 2015-07-03 12:34:05 +03:00
parent 47b6355d66
commit 62a731e244
12 changed files with 83 additions and 83 deletions

View File

@ -22,7 +22,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --> <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib --> <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script> <script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=95"></script> <script src="libs/app.bundle.js?v=96"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin --> <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/> <link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1"> <link rel="stylesheet" href="css/toastr.css?v=1">

View File

@ -30,11 +30,11 @@ You can add translatable text in the HTML:
``` ```
You can also use APP.translation.generateTranslatonHTML(key, options) to get this HTML code as Javascript string. You can also use APP.translation.generateTranslationHTML(key, options) to get this HTML code as Javascript string.
``` ```
APP.translation.generateTranslatonHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span> APP.translation.generateTranslationHTML("dialog.OK") // returns <span data-i18n="dialog.OK">OK</span>
``` ```
The value in the options parameter will be added in data-i18n-options attribute of the element. The value in the options parameter will be added in data-i18n-options attribute of the element.

View File

@ -1564,7 +1564,7 @@ function promptDisplayName() {
'" autofocus>'; '" autofocus>';
var buttonTxt var buttonTxt
= APP.translation.generateTranslatonHTML("dialog.Ok"); = APP.translation.generateTranslationHTML("dialog.Ok");
var buttons = []; var buttons = [];
buttons.push({title: buttonTxt, value: "ok"}); buttons.push({title: buttonTxt, value: "ok"});
@ -1642,15 +1642,15 @@ function streamHandler(stream, isMuted) {
function onXmppConnectionFailed(stropheErrorMsg) { function onXmppConnectionFailed(stropheErrorMsg) {
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.error"); "dialog.error");
var message; var message;
if (stropheErrorMsg) { if (stropheErrorMsg) {
message = APP.translation.generateTranslatonHTML( message = APP.translation.generateTranslationHTML(
"dialog.connectErrorWithMsg", {msg: stropheErrorMsg}); "dialog.connectErrorWithMsg", {msg: stropheErrorMsg});
} else { } else {
message = APP.translation.generateTranslatonHTML( message = APP.translation.generateTranslationHTML(
"dialog.connectError"); "dialog.connectError");
} }
@ -1731,9 +1731,9 @@ function registerListeners() {
); );
}); });
APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) { APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.reservationError"); "dialog.reservationError");
var message = APP.translation.generateTranslatonHTML( var message = APP.translation.generateTranslationHTML(
"dialog.reservationErrorMsg", {code: code, msg: msg}); "dialog.reservationErrorMsg", {code: code, msg: msg});
messageHandler.openDialog( messageHandler.openDialog(
title, title,
@ -1752,7 +1752,7 @@ function registerListeners() {
APP.xmpp.addListener(XMPPEvents.MUC_DESTROYED, function (reason) { APP.xmpp.addListener(XMPPEvents.MUC_DESTROYED, function (reason) {
//FIXME: use Session Terminated from translation, but //FIXME: use Session Terminated from translation, but
// 'reason' text comes from XMPP packet and is not translated // 'reason' text comes from XMPP packet and is not translated
var title = APP.translation.generateTranslatonHTML("dialog.sessTerminated"); var title = APP.translation.generateTranslationHTML("dialog.sessTerminated");
messageHandler.openDialog( messageHandler.openDialog(
title, reason, true, {}, title, reason, true, {},
function (event, value, message, formVals) function (event, value, message, formVals)
@ -1979,7 +1979,7 @@ function updateChatConversation(from, displayName, message, myjid, stamp) {
function onMucJoined(jid, info) { function onMucJoined(jid, info) {
Toolbar.updateRoomUrl(window.location.href); Toolbar.updateRoomUrl(window.location.href);
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")"); $("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")");
var settings = Settings.getSettings(); var settings = Settings.getSettings();
@ -2778,13 +2778,13 @@ var Authentication = {
var room = roomName.substr(0, roomName.indexOf('@')); var room = roomName.substr(0, roomName.indexOf('@'));
var title var title
= APP.translation.generateTranslatonHTML("dialog.WaitingForHost"); = APP.translation.generateTranslationHTML("dialog.WaitingForHost");
var msg var msg
= APP.translation.generateTranslatonHTML( = APP.translation.generateTranslationHTML(
"dialog.WaitForHostMsg", {room: room}); "dialog.WaitForHostMsg", {room: room});
var buttonTxt var buttonTxt
= APP.translation.generateTranslatonHTML("dialog.IamHost"); = APP.translation.generateTranslationHTML("dialog.IamHost");
var buttons = []; var buttons = [];
buttons.push({title: buttonTxt, value: "authNow"}); buttons.push({title: buttonTxt, value: "authNow"});
@ -2912,9 +2912,9 @@ function Dialog(callback, obtainSession) {
'type="password" data-i18n="[placeholder]dialog.userPassword"' + 'type="password" data-i18n="[placeholder]dialog.userPassword"' +
' placeholder="user password">'; ' placeholder="user password">';
var okButton = APP.translation.generateTranslatonHTML("dialog.Ok"); var okButton = APP.translation.generateTranslationHTML("dialog.Ok");
var cancelButton = APP.translation.generateTranslatonHTML("dialog.Cancel"); var cancelButton = APP.translation.generateTranslationHTML("dialog.Cancel");
var states = { var states = {
login: { login: {
@ -3389,13 +3389,13 @@ var Prezi = {
); );
} }
else { else {
var html = APP.translation.generateTranslatonHTML( var html = APP.translation.generateTranslationHTML(
"dialog.sharePreziTitle"); "dialog.sharePreziTitle");
var cancelButton = APP.translation.generateTranslatonHTML( var cancelButton = APP.translation.generateTranslationHTML(
"dialog.Cancel"); "dialog.Cancel");
var shareButton = APP.translation.generateTranslatonHTML( var shareButton = APP.translation.generateTranslationHTML(
"dialog.Share"); "dialog.Share");
var backButton = APP.translation.generateTranslatonHTML( var backButton = APP.translation.generateTranslationHTML(
"dialog.Back"); "dialog.Back");
var buttons = []; var buttons = [];
var buttons1 = []; var buttons1 = [];
@ -3406,7 +3406,7 @@ var Prezi = {
buttons.push({title: shareButton, value: true}); buttons.push({title: shareButton, value: true});
// Back button // Back button
buttons1.push({title: backButton, value: true}); buttons1.push({title: backButton, value: true});
var linkError = APP.translation.generateTranslatonHTML( var linkError = APP.translation.generateTranslationHTML(
"dialog.preziLinkError"); "dialog.preziLinkError");
var defaultUrl = APP.translation.translateString("defaultPreziLink", var defaultUrl = APP.translation.translateString("defaultPreziLink",
{url: "http://prezi.com/wz7vhjycl7e6/my-prezi"}); {url: "http://prezi.com/wz7vhjycl7e6/my-prezi"});
@ -5201,11 +5201,11 @@ function hangup() {
} }
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.sessTerminated"); "dialog.sessTerminated");
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.hungUp"); "dialog.hungUp");
var button = APP.translation.generateTranslatonHTML( var button = APP.translation.generateTranslationHTML(
"dialog.joinAgain"); "dialog.joinAgain");
var buttons = []; var buttons = [];
buttons.push({title: button, value: true}); buttons.push({title: button, value: true});
@ -5229,7 +5229,7 @@ function hangup() {
function toggleRecording() { function toggleRecording() {
APP.xmpp.toggleRecording(function (callback) { APP.xmpp.toggleRecording(function (callback) {
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.recordingToken"); "dialog.recordingToken");
var token = APP.translation.translateString("dialog.token"); var token = APP.translation.translateString("dialog.token");
APP.UI.messageHandler.openTwoButtonDialog(null, null, null, APP.UI.messageHandler.openTwoButtonDialog(null, null, null,
@ -5334,7 +5334,7 @@ function callSipButtonClicked()
var defaultNumber var defaultNumber
= config.defaultSipNumber ? config.defaultSipNumber : ''; = config.defaultSipNumber ? config.defaultSipNumber : '';
var sipMsg = APP.translation.generateTranslatonHTML( var sipMsg = APP.translation.generateTranslationHTML(
"dialog.sipMsg"); "dialog.sipMsg");
messageHandler.openTwoButtonDialog(null, null, null, messageHandler.openTwoButtonDialog(null, null, null,
'<h2>' + sipMsg + '</h2>' + '<h2>' + sipMsg + '</h2>' +
@ -5474,7 +5474,7 @@ var Toolbar = (function (my) {
} }
}); });
} else { } else {
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.passwordMsg"); "dialog.passwordMsg");
var yourPassword = APP.translation.translateString( var yourPassword = APP.translation.translateString(
"dialog.yourPassword"); "dialog.yourPassword");
@ -5544,11 +5544,11 @@ var Toolbar = (function (my) {
* FIXME: not used ? * FIXME: not used ?
*/ */
my.openSettingsDialog = function () { my.openSettingsDialog = function () {
var settings1 = APP.translation.generateTranslatonHTML( var settings1 = APP.translation.generateTranslationHTML(
"dialog.settings1"); "dialog.settings1");
var settings2 = APP.translation.generateTranslatonHTML( var settings2 = APP.translation.generateTranslationHTML(
"dialog.settings2"); "dialog.settings2");
var settings3 = APP.translation.generateTranslatonHTML( var settings3 = APP.translation.generateTranslationHTML(
"dialog.settings3"); "dialog.settings3");
var yourPassword = APP.translation.translateString( var yourPassword = APP.translation.translateString(
@ -6002,9 +6002,9 @@ var messageHandler = (function(my) {
var title = null; var title = null;
if(titleKey) if(titleKey)
{ {
title = APP.translation.generateTranslatonHTML(titleKey); title = APP.translation.generateTranslationHTML(titleKey);
} }
var message = APP.translation.generateTranslatonHTML(messageKey); var message = APP.translation.generateTranslationHTML(messageKey);
$.prompt(message, $.prompt(message,
{ {
title: title, title: title,
@ -6034,20 +6034,20 @@ var messageHandler = (function(my) {
{ {
var buttons = []; var buttons = [];
var leftButton = APP.translation.generateTranslatonHTML(leftButtonKey); var leftButton = APP.translation.generateTranslationHTML(leftButtonKey);
buttons.push({ title: leftButton, value: true}); buttons.push({ title: leftButton, value: true});
var cancelButton var cancelButton
= APP.translation.generateTranslatonHTML("dialog.Cancel"); = APP.translation.generateTranslationHTML("dialog.Cancel");
buttons.push({title: cancelButton, value: false}); buttons.push({title: cancelButton, value: false});
var message = msgString, title = titleString; var message = msgString, title = titleString;
if (titleKey) if (titleKey)
{ {
title = APP.translation.generateTranslatonHTML(titleKey); title = APP.translation.generateTranslationHTML(titleKey);
} }
if (msgKey) { if (msgKey) {
message = APP.translation.generateTranslatonHTML(msgKey); message = APP.translation.generateTranslationHTML(msgKey);
} }
$.prompt(message, { $.prompt(message, {
title: title, title: title,
@ -7239,7 +7239,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
} }
var nameSpan = $('#' + this.videoSpanId + '>span.displayname'); var nameSpan = $('#' + this.videoSpanId + '>span.displayname');
var defaultLocalDisplayName = APP.translation.generateTranslatonHTML( var defaultLocalDisplayName = APP.translation.generateTranslationHTML(
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
// If we already have a display name for this video. // If we already have a display name for this video.
@ -7248,7 +7248,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
if (nameSpan.text() !== displayName) { if (nameSpan.text() !== displayName) {
if (displayName && displayName.length > 0) if (displayName && displayName.length > 0)
{ {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$('#localDisplayName').html(displayName + ' (' + meHTML + ')'); $('#localDisplayName').html(displayName + ' (' + meHTML + ')');
} }
else else
@ -7263,7 +7263,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
if (displayName && displayName.length > 0) { if (displayName && displayName.length > 0) {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
nameSpan.innerHTML = displayName + meHTML; nameSpan.innerHTML = displayName + meHTML;
} }
else { else {
@ -7327,12 +7327,12 @@ LocalVideo.prototype.inputDisplayNameHandler = function (name) {
if (!$('#localDisplayName').is(":visible")) { if (!$('#localDisplayName').is(":visible")) {
if (NicknameHandler.getNickname()) if (NicknameHandler.getNickname())
{ {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$('#localDisplayName').html(NicknameHandler.getNickname() + " (" + meHTML + ")"); $('#localDisplayName').html(NicknameHandler.getNickname() + " (" + meHTML + ")");
} }
else else
{ {
var defaultHTML = APP.translation.generateTranslatonHTML( var defaultHTML = APP.translation.generateTranslationHTML(
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
$('#localDisplayName') $('#localDisplayName')
.html(defaultHTML); .html(defaultHTML);
@ -7768,7 +7768,7 @@ RemoteVideo.prototype.setDisplayName = function(displayName, key) {
} }
else if (key && key.length > 0) else if (key && key.length > 0)
{ {
var nameHtml = APP.translation.generateTranslatonHTML(key); var nameHtml = APP.translation.generateTranslationHTML(key);
$('#' + this.videoSpanId + '_name').html(nameHtml); $('#' + this.videoSpanId + '_name').html(nameHtml);
} }
else else
@ -11375,7 +11375,7 @@ module.exports = {
translateElement: function (selector) { translateElement: function (selector) {
selector.i18n(); selector.i18n();
}, },
generateTranslatonHTML: function (key, options) { generateTranslationHTML: function (key, options) {
var str = "<span data-i18n=\"" + key + "\""; var str = "<span data-i18n=\"" + key + "\"";
if(options) if(options)
{ {

View File

@ -44,7 +44,7 @@ function promptDisplayName() {
'" autofocus>'; '" autofocus>';
var buttonTxt var buttonTxt
= APP.translation.generateTranslatonHTML("dialog.Ok"); = APP.translation.generateTranslationHTML("dialog.Ok");
var buttons = []; var buttons = [];
buttons.push({title: buttonTxt, value: "ok"}); buttons.push({title: buttonTxt, value: "ok"});
@ -122,15 +122,15 @@ function streamHandler(stream, isMuted) {
function onXmppConnectionFailed(stropheErrorMsg) { function onXmppConnectionFailed(stropheErrorMsg) {
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.error"); "dialog.error");
var message; var message;
if (stropheErrorMsg) { if (stropheErrorMsg) {
message = APP.translation.generateTranslatonHTML( message = APP.translation.generateTranslationHTML(
"dialog.connectErrorWithMsg", {msg: stropheErrorMsg}); "dialog.connectErrorWithMsg", {msg: stropheErrorMsg});
} else { } else {
message = APP.translation.generateTranslatonHTML( message = APP.translation.generateTranslationHTML(
"dialog.connectError"); "dialog.connectError");
} }
@ -211,9 +211,9 @@ function registerListeners() {
); );
}); });
APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) { APP.xmpp.addListener(XMPPEvents.RESERVATION_ERROR, function (code, msg) {
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.reservationError"); "dialog.reservationError");
var message = APP.translation.generateTranslatonHTML( var message = APP.translation.generateTranslationHTML(
"dialog.reservationErrorMsg", {code: code, msg: msg}); "dialog.reservationErrorMsg", {code: code, msg: msg});
messageHandler.openDialog( messageHandler.openDialog(
title, title,
@ -232,7 +232,7 @@ function registerListeners() {
APP.xmpp.addListener(XMPPEvents.MUC_DESTROYED, function (reason) { APP.xmpp.addListener(XMPPEvents.MUC_DESTROYED, function (reason) {
//FIXME: use Session Terminated from translation, but //FIXME: use Session Terminated from translation, but
// 'reason' text comes from XMPP packet and is not translated // 'reason' text comes from XMPP packet and is not translated
var title = APP.translation.generateTranslatonHTML("dialog.sessTerminated"); var title = APP.translation.generateTranslationHTML("dialog.sessTerminated");
messageHandler.openDialog( messageHandler.openDialog(
title, reason, true, {}, title, reason, true, {},
function (event, value, message, formVals) function (event, value, message, formVals)
@ -459,7 +459,7 @@ function updateChatConversation(from, displayName, message, myjid, stamp) {
function onMucJoined(jid, info) { function onMucJoined(jid, info) {
Toolbar.updateRoomUrl(window.location.href); Toolbar.updateRoomUrl(window.location.href);
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")"); $("#localNick").html(Strophe.getResourceFromJid(jid) + " (" + meHTML + ")");
var settings = Settings.getSettings(); var settings = Settings.getSettings();

View File

@ -22,13 +22,13 @@ var Authentication = {
var room = roomName.substr(0, roomName.indexOf('@')); var room = roomName.substr(0, roomName.indexOf('@'));
var title var title
= APP.translation.generateTranslatonHTML("dialog.WaitingForHost"); = APP.translation.generateTranslationHTML("dialog.WaitingForHost");
var msg var msg
= APP.translation.generateTranslatonHTML( = APP.translation.generateTranslationHTML(
"dialog.WaitForHostMsg", {room: room}); "dialog.WaitForHostMsg", {room: room});
var buttonTxt var buttonTxt
= APP.translation.generateTranslatonHTML("dialog.IamHost"); = APP.translation.generateTranslationHTML("dialog.IamHost");
var buttons = []; var buttons = [];
buttons.push({title: buttonTxt, value: "authNow"}); buttons.push({title: buttonTxt, value: "authNow"});

View File

@ -31,9 +31,9 @@ function Dialog(callback, obtainSession) {
'type="password" data-i18n="[placeholder]dialog.userPassword"' + 'type="password" data-i18n="[placeholder]dialog.userPassword"' +
' placeholder="user password">'; ' placeholder="user password">';
var okButton = APP.translation.generateTranslatonHTML("dialog.Ok"); var okButton = APP.translation.generateTranslationHTML("dialog.Ok");
var cancelButton = APP.translation.generateTranslatonHTML("dialog.Cancel"); var cancelButton = APP.translation.generateTranslationHTML("dialog.Cancel");
var states = { var states = {
login: { login: {

View File

@ -58,13 +58,13 @@ var Prezi = {
); );
} }
else { else {
var html = APP.translation.generateTranslatonHTML( var html = APP.translation.generateTranslationHTML(
"dialog.sharePreziTitle"); "dialog.sharePreziTitle");
var cancelButton = APP.translation.generateTranslatonHTML( var cancelButton = APP.translation.generateTranslationHTML(
"dialog.Cancel"); "dialog.Cancel");
var shareButton = APP.translation.generateTranslatonHTML( var shareButton = APP.translation.generateTranslationHTML(
"dialog.Share"); "dialog.Share");
var backButton = APP.translation.generateTranslatonHTML( var backButton = APP.translation.generateTranslationHTML(
"dialog.Back"); "dialog.Back");
var buttons = []; var buttons = [];
var buttons1 = []; var buttons1 = [];
@ -75,7 +75,7 @@ var Prezi = {
buttons.push({title: shareButton, value: true}); buttons.push({title: shareButton, value: true});
// Back button // Back button
buttons1.push({title: backButton, value: true}); buttons1.push({title: backButton, value: true});
var linkError = APP.translation.generateTranslatonHTML( var linkError = APP.translation.generateTranslationHTML(
"dialog.preziLinkError"); "dialog.preziLinkError");
var defaultUrl = APP.translation.translateString("defaultPreziLink", var defaultUrl = APP.translation.translateString("defaultPreziLink",
{url: "http://prezi.com/wz7vhjycl7e6/my-prezi"}); {url: "http://prezi.com/wz7vhjycl7e6/my-prezi"});

View File

@ -101,11 +101,11 @@ function hangup() {
} }
var title = APP.translation.generateTranslatonHTML( var title = APP.translation.generateTranslationHTML(
"dialog.sessTerminated"); "dialog.sessTerminated");
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.hungUp"); "dialog.hungUp");
var button = APP.translation.generateTranslatonHTML( var button = APP.translation.generateTranslationHTML(
"dialog.joinAgain"); "dialog.joinAgain");
var buttons = []; var buttons = [];
buttons.push({title: button, value: true}); buttons.push({title: button, value: true});
@ -129,7 +129,7 @@ function hangup() {
function toggleRecording() { function toggleRecording() {
APP.xmpp.toggleRecording(function (callback) { APP.xmpp.toggleRecording(function (callback) {
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.recordingToken"); "dialog.recordingToken");
var token = APP.translation.translateString("dialog.token"); var token = APP.translation.translateString("dialog.token");
APP.UI.messageHandler.openTwoButtonDialog(null, null, null, APP.UI.messageHandler.openTwoButtonDialog(null, null, null,
@ -234,7 +234,7 @@ function callSipButtonClicked()
var defaultNumber var defaultNumber
= config.defaultSipNumber ? config.defaultSipNumber : ''; = config.defaultSipNumber ? config.defaultSipNumber : '';
var sipMsg = APP.translation.generateTranslatonHTML( var sipMsg = APP.translation.generateTranslationHTML(
"dialog.sipMsg"); "dialog.sipMsg");
messageHandler.openTwoButtonDialog(null, null, null, messageHandler.openTwoButtonDialog(null, null, null,
'<h2>' + sipMsg + '</h2>' + '<h2>' + sipMsg + '</h2>' +
@ -374,7 +374,7 @@ var Toolbar = (function (my) {
} }
}); });
} else { } else {
var msg = APP.translation.generateTranslatonHTML( var msg = APP.translation.generateTranslationHTML(
"dialog.passwordMsg"); "dialog.passwordMsg");
var yourPassword = APP.translation.translateString( var yourPassword = APP.translation.translateString(
"dialog.yourPassword"); "dialog.yourPassword");
@ -444,11 +444,11 @@ var Toolbar = (function (my) {
* FIXME: not used ? * FIXME: not used ?
*/ */
my.openSettingsDialog = function () { my.openSettingsDialog = function () {
var settings1 = APP.translation.generateTranslatonHTML( var settings1 = APP.translation.generateTranslationHTML(
"dialog.settings1"); "dialog.settings1");
var settings2 = APP.translation.generateTranslatonHTML( var settings2 = APP.translation.generateTranslationHTML(
"dialog.settings2"); "dialog.settings2");
var settings3 = APP.translation.generateTranslatonHTML( var settings3 = APP.translation.generateTranslationHTML(
"dialog.settings3"); "dialog.settings3");
var yourPassword = APP.translation.translateString( var yourPassword = APP.translation.translateString(

View File

@ -11,9 +11,9 @@ var messageHandler = (function(my) {
var title = null; var title = null;
if(titleKey) if(titleKey)
{ {
title = APP.translation.generateTranslatonHTML(titleKey); title = APP.translation.generateTranslationHTML(titleKey);
} }
var message = APP.translation.generateTranslatonHTML(messageKey); var message = APP.translation.generateTranslationHTML(messageKey);
$.prompt(message, $.prompt(message,
{ {
title: title, title: title,
@ -43,20 +43,20 @@ var messageHandler = (function(my) {
{ {
var buttons = []; var buttons = [];
var leftButton = APP.translation.generateTranslatonHTML(leftButtonKey); var leftButton = APP.translation.generateTranslationHTML(leftButtonKey);
buttons.push({ title: leftButton, value: true}); buttons.push({ title: leftButton, value: true});
var cancelButton var cancelButton
= APP.translation.generateTranslatonHTML("dialog.Cancel"); = APP.translation.generateTranslationHTML("dialog.Cancel");
buttons.push({title: cancelButton, value: false}); buttons.push({title: cancelButton, value: false});
var message = msgString, title = titleString; var message = msgString, title = titleString;
if (titleKey) if (titleKey)
{ {
title = APP.translation.generateTranslatonHTML(titleKey); title = APP.translation.generateTranslationHTML(titleKey);
} }
if (msgKey) { if (msgKey) {
message = APP.translation.generateTranslatonHTML(msgKey); message = APP.translation.generateTranslationHTML(msgKey);
} }
$.prompt(message, { $.prompt(message, {
title: title, title: title,

View File

@ -46,7 +46,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
} }
var nameSpan = $('#' + this.videoSpanId + '>span.displayname'); var nameSpan = $('#' + this.videoSpanId + '>span.displayname');
var defaultLocalDisplayName = APP.translation.generateTranslatonHTML( var defaultLocalDisplayName = APP.translation.generateTranslationHTML(
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
// If we already have a display name for this video. // If we already have a display name for this video.
@ -55,7 +55,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
if (nameSpan.text() !== displayName) { if (nameSpan.text() !== displayName) {
if (displayName && displayName.length > 0) if (displayName && displayName.length > 0)
{ {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$('#localDisplayName').html(displayName + ' (' + meHTML + ')'); $('#localDisplayName').html(displayName + ' (' + meHTML + ')');
} }
else else
@ -70,7 +70,7 @@ LocalVideo.prototype.setDisplayName = function(displayName, key) {
if (displayName && displayName.length > 0) { if (displayName && displayName.length > 0) {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
nameSpan.innerHTML = displayName + meHTML; nameSpan.innerHTML = displayName + meHTML;
} }
else { else {
@ -134,12 +134,12 @@ LocalVideo.prototype.inputDisplayNameHandler = function (name) {
if (!$('#localDisplayName').is(":visible")) { if (!$('#localDisplayName').is(":visible")) {
if (NicknameHandler.getNickname()) if (NicknameHandler.getNickname())
{ {
var meHTML = APP.translation.generateTranslatonHTML("me"); var meHTML = APP.translation.generateTranslationHTML("me");
$('#localDisplayName').html(NicknameHandler.getNickname() + " (" + meHTML + ")"); $('#localDisplayName').html(NicknameHandler.getNickname() + " (" + meHTML + ")");
} }
else else
{ {
var defaultHTML = APP.translation.generateTranslatonHTML( var defaultHTML = APP.translation.generateTranslationHTML(
interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME); interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
$('#localDisplayName') $('#localDisplayName')
.html(defaultHTML); .html(defaultHTML);

View File

@ -347,7 +347,7 @@ RemoteVideo.prototype.setDisplayName = function(displayName, key) {
} }
else if (key && key.length > 0) else if (key && key.length > 0)
{ {
var nameHtml = APP.translation.generateTranslatonHTML(key); var nameHtml = APP.translation.generateTranslationHTML(key);
$('#' + this.videoSpanId + '_name').html(nameHtml); $('#' + this.videoSpanId + '_name').html(nameHtml);
} }
else else

View File

@ -122,7 +122,7 @@ module.exports = {
translateElement: function (selector) { translateElement: function (selector) {
selector.i18n(); selector.i18n();
}, },
generateTranslatonHTML: function (key, options) { generateTranslationHTML: function (key, options) {
var str = "<span data-i18n=\"" + key + "\""; var str = "<span data-i18n=\"" + key + "\"";
if(options) if(options)
{ {