Updates some translations for login dialog.
This commit is contained in:
parent
0455c26fb2
commit
54cfbaaba0
|
@ -146,16 +146,13 @@ function doXmppAuth (room, lockPassword) {
|
||||||
room.getName(), APP.conference._getConferenceOptions()
|
room.getName(), APP.conference._getConferenceOptions()
|
||||||
);
|
);
|
||||||
|
|
||||||
loginDialog.displayConnectionStatus(
|
loginDialog.displayConnectionStatus('connection.FETCH_SESSION_ID');
|
||||||
APP.translation.translateString('connection.FETCH_SESSION_ID')
|
|
||||||
);
|
|
||||||
|
|
||||||
newRoom.room.moderator.authenticate().then(function () {
|
newRoom.room.moderator.authenticate().then(function () {
|
||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
|
|
||||||
loginDialog.displayConnectionStatus(
|
loginDialog.displayConnectionStatus(
|
||||||
APP.translation.translateString('connection.GOT_SESSION_ID')
|
'connection.GOT_SESSION_ID');
|
||||||
);
|
|
||||||
|
|
||||||
// authenticate conference on the fly
|
// authenticate conference on the fly
|
||||||
room.join(lockPassword);
|
room.join(lockPassword);
|
||||||
|
@ -166,11 +163,8 @@ function doXmppAuth (room, lockPassword) {
|
||||||
|
|
||||||
console.error('Auth on the fly failed', error);
|
console.error('Auth on the fly failed', error);
|
||||||
|
|
||||||
let errorMsg = APP.translation.translateString(
|
loginDialog.displayError(
|
||||||
'connection.GET_SESSION_ID_ERROR'
|
'connection.GET_SESSION_ID_ERROR', code);
|
||||||
);
|
|
||||||
|
|
||||||
loginDialog.displayError(errorMsg + code);
|
|
||||||
});
|
});
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
loginDialog.displayError(err);
|
loginDialog.displayError(err);
|
||||||
|
|
|
@ -128,27 +128,31 @@ function LoginDialog(successCallback, cancelCallback) {
|
||||||
/**
|
/**
|
||||||
* Displays error message in 'finished' state which allows either to cancel
|
* Displays error message in 'finished' state which allows either to cancel
|
||||||
* or retry.
|
* or retry.
|
||||||
* @param message the final message to be displayed.
|
* @param messageKey the key to the message to be displayed.
|
||||||
|
* @param code the code error (optional)
|
||||||
*/
|
*/
|
||||||
this.displayError = function (message) {
|
this.displayError = function (messageKey, code) {
|
||||||
|
|
||||||
let finishedState = connDialog.getState('finished');
|
let finishedState = connDialog.getState('finished');
|
||||||
|
|
||||||
let errorMessageElem = finishedState.find('#errorMessage');
|
let errorMessageElem = finishedState.find('#errorMessage');
|
||||||
errorMessageElem.text(message);
|
errorMessageElem.attr("data-i18n", messageKey);
|
||||||
|
errorMessageElem.text(
|
||||||
|
APP.translation.translateString(messageKey) + (code ? code : ''));
|
||||||
|
|
||||||
connDialog.goToState('finished');
|
connDialog.goToState('finished');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show message as connection status.
|
* Show message as connection status.
|
||||||
* @param {string} message
|
* @param {string} messageKey the key to the message
|
||||||
*/
|
*/
|
||||||
this.displayConnectionStatus = function (message) {
|
this.displayConnectionStatus = function (messageKey) {
|
||||||
let connectingState = connDialog.getState('connecting');
|
let connectingState = connDialog.getState('connecting');
|
||||||
|
|
||||||
let connectionStatus = connectingState.find('#connectionStatus');
|
let connectionStatus = connectingState.find('#connectionStatus');
|
||||||
connectionStatus.text(message);
|
connectionStatus.attr("data-i18n", messageKey);
|
||||||
|
connectionStatus.text(APP.translation.translateString(messageKey));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue