Revert "Make the disabled PowerSelector element showing custom value translatable. Fixes #5547"
This reverts commit 681f43913a
.
This commit is contained in:
parent
681f43913a
commit
184b29daf8
2 changed files with 6 additions and 7 deletions
|
@ -18,7 +18,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as Roles from '../../../Roles';
|
import * as Roles from '../../../Roles';
|
||||||
import { _t, _tJsx } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
|
|
||||||
let LEVEL_ROLE_MAP = {};
|
let LEVEL_ROLE_MAP = {};
|
||||||
const reverseRoles = {};
|
const reverseRoles = {};
|
||||||
|
@ -85,11 +85,13 @@ module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
let customPicker;
|
let customPicker;
|
||||||
if (this.state.custom) {
|
if (this.state.custom) {
|
||||||
|
let input;
|
||||||
if (this.props.disabled) {
|
if (this.props.disabled) {
|
||||||
customPicker = <span>{ _tJsx('Custom of <span/>', [/<span\/>/], [(sub) => <span>{ this.props.value }</span>]) }</span>;
|
input = <span>{ this.props.value }</span>;
|
||||||
} else {
|
} else {
|
||||||
customPicker = <span><input ref="custom" type="text" size="3" defaultValue={this.props.value} onBlur={this.onCustomBlur} onKeyDown={this.onCustomKeyDown} /></span>;
|
input = <input ref="custom" type="text" size="3" defaultValue={this.props.value} onBlur={this.onCustomBlur} onKeyDown={this.onCustomKeyDown} />;
|
||||||
}
|
}
|
||||||
|
customPicker = <span> of { input }</span>;
|
||||||
}
|
}
|
||||||
|
|
||||||
let selectValue;
|
let selectValue;
|
||||||
|
@ -100,9 +102,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
let select;
|
let select;
|
||||||
if (this.props.disabled) {
|
if (this.props.disabled) {
|
||||||
if (!this.state.custom) {
|
select = <span>{ selectValue }</span>;
|
||||||
select = <span>{ selectValue }</span>;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Each level must have a definition in LEVEL_ROLE_MAP
|
// Each level must have a definition in LEVEL_ROLE_MAP
|
||||||
const levels = [0, 50, 100];
|
const levels = [0, 50, 100];
|
||||||
|
|
|
@ -581,7 +581,6 @@
|
||||||
"%(items)s and %(count)s others|other": "%(items)s and %(count)s others",
|
"%(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 %(count)s others|one": "%(items)s and one other",
|
||||||
"%(items)s and %(lastItem)s": "%(items)s and %(lastItem)s",
|
"%(items)s and %(lastItem)s": "%(items)s and %(lastItem)s",
|
||||||
"Custom of <span/>": "Custom of <span/>",
|
|
||||||
"Custom level": "Custom level",
|
"Custom level": "Custom level",
|
||||||
"Room directory": "Room directory",
|
"Room directory": "Room directory",
|
||||||
"Start chat": "Start chat",
|
"Start chat": "Start chat",
|
||||||
|
|
Loading…
Reference in a new issue