From 184b29daf8131fef071af210231ad3755ed61292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20V=C3=A1gner?= Date: Sat, 18 Nov 2017 16:58:36 +0100 Subject: [PATCH] Revert "Make the disabled PowerSelector element showing custom value translatable. Fixes #5547" This reverts commit 681f43913acc1a51b34ca63b1d188381b134be9c. --- src/components/views/elements/PowerSelector.js | 12 ++++++------ src/i18n/strings/en_EN.json | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/views/elements/PowerSelector.js b/src/components/views/elements/PowerSelector.js index 8e60a7066d..a0aaa12ff1 100644 --- a/src/components/views/elements/PowerSelector.js +++ b/src/components/views/elements/PowerSelector.js @@ -18,7 +18,7 @@ limitations under the License. import React from 'react'; import * as Roles from '../../../Roles'; -import { _t, _tJsx } from '../../../languageHandler'; +import { _t } from '../../../languageHandler'; let LEVEL_ROLE_MAP = {}; const reverseRoles = {}; @@ -85,11 +85,13 @@ module.exports = React.createClass({ render: function() { let customPicker; if (this.state.custom) { + let input; if (this.props.disabled) { - customPicker = { _tJsx('Custom of ', [//], [(sub) => { this.props.value }]) }; + input = { this.props.value }; } else { - customPicker = ; + input = ; } + customPicker = of { input }; } let selectValue; @@ -100,9 +102,7 @@ module.exports = React.createClass({ } let select; if (this.props.disabled) { - if (!this.state.custom) { - select = { selectValue }; - } + select = { selectValue }; } else { // Each level must have a definition in LEVEL_ROLE_MAP const levels = [0, 50, 100]; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index cfc28e3432..83793291c9 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -581,7 +581,6 @@ "%(items)s and %(count)s others|other": "%(items)s and %(count)s others", "%(items)s and %(count)s others|one": "%(items)s and one other", "%(items)s and %(lastItem)s": "%(items)s and %(lastItem)s", - "Custom of ": "Custom of ", "Custom level": "Custom level", "Room directory": "Room directory", "Start chat": "Start chat",