From a437f23e9df6b63c2dee2d329cb138433a5af25a Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 26 Aug 2017 18:48:24 +0100 Subject: [PATCH] add i18n Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .../views/dialogs/DevtoolsDialog.js | 33 ++++++++++--------- src/i18n/strings/en_EN.json | 10 ++++++ 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js index f9ee7c5d27..dc8f8769c1 100644 --- a/src/components/views/dialogs/DevtoolsDialog.js +++ b/src/components/views/dialogs/DevtoolsDialog.js @@ -16,6 +16,7 @@ limitations under the License. import React from 'react'; import sdk from 'matrix-react-sdk'; +import { _t } from 'matrix-react-sdk/lib/languageHandler'; import MatrixClientPeg from 'matrix-react-sdk/lib/MatrixClientPeg'; class SendCustomEvent extends React.Component { @@ -44,8 +45,8 @@ class SendCustomEvent extends React.Component { _buttons() { return
- - {!this.state.message && } + + {!this.state.message && }
; } @@ -58,9 +59,9 @@ class SendCustomEvent extends React.Component { try { const content = JSON.parse(this.refs.evContent.value); await this.send(content); - message = 'Event sent!'; + message = _t('Event sent!'); } catch (e) { - message = 'Failed to send custom event.' + ` (${e.toString()})`; + message = `${_t('Failed to send custom event.')} (${e.toString()})`; } this.setState({ message }); } @@ -78,14 +79,14 @@ class SendCustomEvent extends React.Component { return
- +
- +