mirror of
https://github.com/mue/mue.git
synced 2026-07-23 08:47:19 +02:00
fix: more translation support for settings and feedback
This commit is contained in:
@@ -9,7 +9,7 @@ export default class Dropdown extends React.PureComponent {
|
||||
};
|
||||
}
|
||||
|
||||
getLabel() {
|
||||
getLabel = () => {
|
||||
return this.props.label ? <label>{this.props.label}</label> : null;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class Dropdown extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
{this.getLabel()}
|
||||
{this.getLabel}
|
||||
<select id={this.props.name} value={this.state.value} onChange={this.onChange} style={{width: `${(8*this.state.title.length) + 50}px`}}>
|
||||
{this.props.children}
|
||||
</select>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default class FileUpload extends React.PureComponent {
|
||||
} else {
|
||||
// background upload
|
||||
if (file.size > 2000000) {
|
||||
return toast('File is over 2MB');
|
||||
return toast(window.language.modals.main.file_upload_error);
|
||||
}
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
@@ -34,7 +34,7 @@ export default class TimeSettings extends React.PureComponent {
|
||||
const digitalSettings = (
|
||||
<>
|
||||
<h3>{time.digital.title}</h3>
|
||||
<Radio title='Format' name='timeformat' options={digitalOptions} />
|
||||
<Radio title={time.format} name='timeformat' options={digitalOptions} />
|
||||
<br/>
|
||||
<Checkbox name='seconds' text={time.digital.seconds} />
|
||||
<Checkbox name='zero' text={time.digital.zero} />
|
||||
@@ -94,7 +94,7 @@ export default class TimeSettings extends React.PureComponent {
|
||||
<>
|
||||
<h2>{time.title}</h2>
|
||||
<Switch name='time' text={this.language.enabled} />
|
||||
<Dropdown label='Type' name='timeType' onChange={(value) => this.setState({ timeType: value })}>
|
||||
<Dropdown label={time.type} name='timeType' onChange={(value) => this.setState({ timeType: value })}>
|
||||
<option value='digital'>{time.digital.title}</option>
|
||||
<option value='analogue'>{time.analogue.title}</option>
|
||||
<option value='percentageComplete'>{time.percentage_complete}</option>
|
||||
@@ -103,7 +103,7 @@ export default class TimeSettings extends React.PureComponent {
|
||||
|
||||
<h3>{time.date.title}</h3>
|
||||
<Switch name='date' text={this.language.enabled} />
|
||||
<Dropdown label='Type' name='dateType' onChange={(value) => this.setState({ dateType: value })}>
|
||||
<Dropdown label={time.type} name='dateType' onChange={(value) => this.setState({ dateType: value })}>
|
||||
<option value='long'>{time.date.type.long}</option>
|
||||
<option value='short'>{time.date.type.short}</option>
|
||||
</Dropdown>
|
||||
|
||||
Reference in New Issue
Block a user