Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Updates some translations for login dialog.

damencho54cfbaaba038
diff --git a/modules/UI/authentication/AuthHandler.js b/modules/UI/authentication/AuthHandler.js
index 8ce8246bab..1d91367101 100644
--- a/modules/UI/authentication/AuthHandler.js
+++ b/modules/UI/authentication/AuthHandler.js
@@ -146,16 +146,13 @@ function doXmppAuth (room, lockPassword) {
room.getName(), APP.conference._getConferenceOptions()
);
- loginDialog.displayConnectionStatus(
- APP.translation.translateString('connection.FETCH_SESSION_ID')
- );
+ loginDialog.displayConnectionStatus('connection.FETCH_SESSION_ID');
newRoom.room.moderator.authenticate().then(function () {
connection.disconnect();
loginDialog.displayConnectionStatus(
- APP.translation.translateString('connection.GOT_SESSION_ID')
- );
+ 'connection.GOT_SESSION_ID');
// authenticate conference on the fly
room.join(lockPassword);
@@ -166,11 +163,8 @@ function doXmppAuth (room, lockPassword) {
console.error('Auth on the fly failed', error);
- let errorMsg = APP.translation.translateString(
- 'connection.GET_SESSION_ID_ERROR'
- );
-
- loginDialog.displayError(errorMsg + code);
+ loginDialog.displayError(
+ 'connection.GET_SESSION_ID_ERROR', code);
});
}, function (err) {
loginDialog.displayError(err);
diff --git a/modules/UI/authentication/LoginDialog.js b/modules/UI/authentication/LoginDialog.js
index 20155cdbb6..2bf9a17dab 100644
--- a/modules/UI/authentication/LoginDialog.js
+++ b/modules/UI/authentication/LoginDialog.js
@@ -128,27 +128,31 @@ function LoginDialog(successCallback, cancelCallback) {
/**
* Displays error message in 'finished' state which allows either to cancel
* 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 errorMessageElem = finishedState.find('#errorMessage');
- errorMessageElem.text(message);
+ errorMessageElem.attr("data-i18n", messageKey);
+ errorMessageElem.text(
+ APP.translation.translateString(messageKey) + (code ? code : ''));
connDialog.goToState('finished');
};
/**
* 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 connectionStatus = connectingState.find('#connectionStatus');
- connectionStatus.text(message);
+ connectionStatus.attr("data-i18n", messageKey);
+ connectionStatus.text(APP.translation.translateString(messageKey));
};
/**