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:
parent
9112fc231a
commit
443ab1add7
30 changed files with 31 additions and 78 deletions
|
@ -378,7 +378,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t('Reject invitation'),
|
||||
description: _t('Are you sure you want to reject the invitation?'),
|
||||
button: "OK",
|
||||
onFinished: (confirm) => {
|
||||
if (confirm) {
|
||||
// FIXME: controller shouldn't be loading a view :(
|
||||
|
@ -395,7 +394,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t('Failed to reject invitation'),
|
||||
description: err.toString(),
|
||||
button: _t("OK"),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -895,7 +893,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t('Signed Out'),
|
||||
description: _t('For security, this session has been signed out. Please sign in again.'),
|
||||
button: _t("OK"),
|
||||
});
|
||||
dis.dispatch({
|
||||
action: 'logout',
|
||||
|
|
|
@ -531,7 +531,7 @@ module.exports = React.createClass({
|
|||
if (!userHasUsedEncryption) {
|
||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t("Warning") + "!",
|
||||
title: _t("Warning!"),
|
||||
hasCancelButton: false,
|
||||
description: (
|
||||
<div>
|
||||
|
@ -541,7 +541,6 @@ module.exports = React.createClass({
|
|||
<p>{ _t("Encrypted messages will not be visible on clients that do not yet implement encryption") }.</p>
|
||||
</div>
|
||||
),
|
||||
button: "OK",
|
||||
});
|
||||
}
|
||||
if (localStorage) {
|
||||
|
@ -882,7 +881,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Failed to join room"),
|
||||
description: msg,
|
||||
button: _t("OK"),
|
||||
});
|
||||
}
|
||||
}).done();
|
||||
|
@ -964,7 +962,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t('Failed to upload file'),
|
||||
description: ((error && error.message) ? error.message : _t("Server may be unavailable, overloaded, or the file too big")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -1052,7 +1049,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Search failed"),
|
||||
description: ((error && error.message) ? error.message : _t("Server may be unavailable, overloaded, or search timed out :(")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
}).finally(function() {
|
||||
self.setState({
|
||||
|
@ -1180,7 +1176,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Failed to save settings"),
|
||||
description: fails.map(function(result) { return result.reason; }).join("\n"),
|
||||
button: _t("OK"),
|
||||
});
|
||||
// still editing room settings
|
||||
}
|
||||
|
@ -1220,7 +1215,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error"),
|
||||
description: _t("Failed to forget room %(errCode)s", { errCode: errCode }),
|
||||
button: _t("OK"),
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -1243,7 +1237,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Failed to reject invite"),
|
||||
description: msg,
|
||||
button: _t("OK"),
|
||||
});
|
||||
|
||||
self.setState({
|
||||
|
|
|
@ -914,7 +914,6 @@ var TimelinePanel = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Failed to load timeline position"),
|
||||
description: message,
|
||||
button: _t("OK"),
|
||||
onFinished: onFinished,
|
||||
});
|
||||
};
|
||||
|
|
|
@ -249,7 +249,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Can't load user settings"),
|
||||
description: ((error && error.message) ? error.message : _t("Server may be unavailable or overloaded")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -292,7 +291,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Failed to set avatar"),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
button: _t("OK")
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -335,7 +333,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Error"),
|
||||
description: errMsg,
|
||||
button: _t("OK"),
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -344,7 +341,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Success"),
|
||||
description: _t("Your password was successfully changed. You will not receive push notifications on other devices until you log back in to them") + ".",
|
||||
button: _t("OK"),
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -372,7 +368,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Invalid Email Address"),
|
||||
description: _t("This doesn't appear to be a valid email address"),
|
||||
button: _t("OK"),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
@ -392,7 +387,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Unable to add email address"),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
});
|
||||
ReactDOM.findDOMNode(this.refs.add_email_input).blur();
|
||||
|
@ -418,7 +412,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Unable to remove contact information"),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
}).done();
|
||||
}
|
||||
|
@ -460,7 +453,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: _t("Unable to verify email address"),
|
||||
description: ((err && err.message) ? err.message : _t("Operation failed")),
|
||||
button: _t("OK"),
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -90,7 +90,7 @@ module.exports = React.createClass({
|
|||
else {
|
||||
var QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||
Modal.createDialog(QuestionDialog, {
|
||||
title: _t('Warning'),
|
||||
title: _t('Warning!'),
|
||||
description:
|
||||
<div>
|
||||
{ _t(
|
||||
|
@ -157,7 +157,6 @@ module.exports = React.createClass({
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
title: title,
|
||||
description: body,
|
||||
button: _t("OK"),
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue