Put back default strings on dialogs

But make them work by calling _t in render rather than
getDefaultProps().

Also sort out some 'Warning!' strings
This commit is contained in:
David Baker 2017-05-25 18:20:48 +01:00
parent 9112fc231a
commit 443ab1add7
30 changed files with 31 additions and 78 deletions

View file

@ -145,7 +145,6 @@ function _setCallListeners(call) {
Modal.createDialog(ErrorDialog, {
title: _t('Call Timeout'),
description: _t('The remote side failed to pick up') + '.',
button: _t("OK"),
});
}
else if (oldState === "invite_sent") {
@ -207,7 +206,6 @@ function _onAction(payload) {
Modal.createDialog(ErrorDialog, {
title: _t('Unable to capture screen'),
description: screenCapErrorString,
button: _t("OK"),
});
return;
}
@ -228,7 +226,6 @@ function _onAction(payload) {
Modal.createDialog(ErrorDialog, {
title: _t('Existing Call'),
description: _t('You are already in a call') + '.',
button: _t("OK"),
});
return; // don't allow >1 call to be placed.
}
@ -239,7 +236,6 @@ function _onAction(payload) {
Modal.createDialog(ErrorDialog, {
title: _t('VoIP is unsupported'),
description: _t('You cannot place VoIP calls in this browser') + '.',
button: _t("OK"),
});
return;
}
@ -255,8 +251,6 @@ function _onAction(payload) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
description: _t('You cannot place a call with yourself') + '.',
title: _t("Error"),
button: _t("OK"),
});
return;
}
@ -283,8 +277,6 @@ function _onAction(payload) {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
description: _t('Conference calls are not supported in this client'),
title: _t("Error"),
button: _t("OK"),
});
}
else if (!MatrixClientPeg.get().supportsVoip()) {
@ -292,7 +284,6 @@ function _onAction(payload) {
Modal.createDialog(ErrorDialog, {
title: _t('VoIP is unsupported'),
description: _t('You cannot place VoIP calls in this browser') + '.',
button: _t("OK"),
});
}
else if (MatrixClientPeg.get().isRoomEncrypted(payload.room_id)) {
@ -304,17 +295,14 @@ function _onAction(payload) {
// Therefore we disable conference calling in E2E rooms.
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
button: _t("OK"),
description: _t('Conference calls are not supported in encrypted rooms'),
});
}
else {
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createDialog(QuestionDialog, {
title: _t('Warning') + '!',
title: _t('Warning!'),
description: _t('Conference calling is in development and may not be reliable') + '.',
button: _t("OK"),
onFinished: confirm=>{
if (confirm) {
ConferenceHandler.createNewMatrixCall(
@ -327,7 +315,6 @@ function _onAction(payload) {
Modal.createDialog(ErrorDialog, {
title: _t('Failed to set up conference call'),
description: _t('Conference call failed') + '. ' + ((err && err.message) ? err.message : ''),
button: _t("OK"),
});
});
}