|
@@ -128,27 +128,31 @@ function LoginDialog(successCallback, cancelCallback) {
|
128
|
128
|
/**
|
129
|
129
|
* Displays error message in 'finished' state which allows either to cancel
|
130
|
130
|
* or retry.
|
131
|
|
- * @param message the final message to be displayed.
|
|
131
|
+ * @param messageKey the key to the message to be displayed.
|
|
132
|
+ * @param code the code error (optional)
|
132
|
133
|
*/
|
133
|
|
- this.displayError = function (message) {
|
|
134
|
+ this.displayError = function (messageKey, code) {
|
134
|
135
|
|
135
|
136
|
let finishedState = connDialog.getState('finished');
|
136
|
137
|
|
137
|
138
|
let errorMessageElem = finishedState.find('#errorMessage');
|
138
|
|
- errorMessageElem.text(message);
|
|
139
|
+ errorMessageElem.attr("data-i18n", messageKey);
|
|
140
|
+ errorMessageElem.text(
|
|
141
|
+ APP.translation.translateString(messageKey) + (code ? code : ''));
|
139
|
142
|
|
140
|
143
|
connDialog.goToState('finished');
|
141
|
144
|
};
|
142
|
145
|
|
143
|
146
|
/**
|
144
|
147
|
* Show message as connection status.
|
145
|
|
- * @param {string} message
|
|
148
|
+ * @param {string} messageKey the key to the message
|
146
|
149
|
*/
|
147
|
|
- this.displayConnectionStatus = function (message) {
|
|
150
|
+ this.displayConnectionStatus = function (messageKey) {
|
148
|
151
|
let connectingState = connDialog.getState('connecting');
|
149
|
152
|
|
150
|
153
|
let connectionStatus = connectingState.find('#connectionStatus');
|
151
|
|
- connectionStatus.text(message);
|
|
154
|
+ connectionStatus.attr("data-i18n", messageKey);
|
|
155
|
+ connectionStatus.text(APP.translation.translateString(messageKey));
|
152
|
156
|
};
|
153
|
157
|
|
154
|
158
|
/**
|