+ return (
+
+
+ { this.props.label }
- );
- }
- else {
- return (
-
-
- { this.props.label }
-
-
- );
- }
+
+ );
}
});
diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js
index 11dc79ac..11948ace 100644
--- a/src/components/views/settings/Notifications.js
+++ b/src/components/views/settings/Notifications.js
@@ -16,6 +16,7 @@ limitations under the License.
'use strict';
var React = require('react');
+import { _t } from 'matrix-react-sdk/lib/languageHandler';
var q = require("q");
var sdk = require('matrix-react-sdk');
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
@@ -131,8 +132,8 @@ module.exports = React.createClass({
}, (error) => {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
- title: "Error saving email notification preferences",
- description: "An error occurred whilst saving your email notification preferences.",
+ title: _t('Error saving email notification preferences'),
+ description: _t('An error occurred whilst saving your email notification preferences.'),
});
});
},
@@ -175,8 +176,8 @@ module.exports = React.createClass({
var TextInputDialog = sdk.getComponent("dialogs.TextInputDialog");
Modal.createDialog(TextInputDialog, {
- title: "Keywords",
- description: "Enter keywords separated by a comma:",
+ title: _t('Keywords'),
+ description: _t('Enter keywords separated by a comma:'),
value: keywords,
onFinished: function onFinished(should_leave, newValue) {
@@ -240,8 +241,8 @@ module.exports = React.createClass({
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Failed to change settings: " + error);
Modal.createDialog(ErrorDialog, {
- title: "Failed to change settings",
- description: ((error && error.message) ? error.message : "Operation failed"),
+ title: _t('Failed to change settings'),
+ description: ((error && error.message) ? error.message : _t('Operation failed')),
onFinished: self._refreshFromServer
});
});
@@ -310,8 +311,8 @@ module.exports = React.createClass({
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Can't update user notification settings: " + error);
Modal.createDialog(ErrorDialog, {
- title: "Can't update user notification settings",
- description: ((error && error.message) ? error.message : "Operation failed"),
+ title: _t('Can\'t update user notification settings'),
+ description: ((error && error.message) ? error.message : _t('Operation failed')),
onFinished: self._refreshFromServer
});
});
@@ -352,8 +353,8 @@ module.exports = React.createClass({
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
console.error("Failed to update keywords: " + error);
Modal.createDialog(ErrorDialog, {
- title: "Failed to update keywords",
- description: ((error && error.message) ? error.message : "Operation failed"),
+ title: _t('Failed to update keywords'),
+ description: ((error && error.message) ? error.message : _t('Operation failed')),
onFinished: self._refreshFromServer
});
}
@@ -562,8 +563,8 @@ module.exports = React.createClass({
// Build the rules not managed by Vector UI
var otherRulesDescriptions = {
- '.m.rule.message': "Notify for all other messages/rooms",
- '.m.rule.fallback': "Notify me for anything else"
+ '.m.rule.message': _t('Notify for all other messages/rooms'),
+ '.m.rule.fallback': _t('Notify me for anything else'),
};
for (var i in defaultRules.others) {
@@ -698,7 +699,7 @@ module.exports = React.createClass({