mirror of
https://github.com/mue/mue.git
synced 2026-07-27 10:41:08 +02:00
fix(translations): fix issues caused by refactor
This commit is contained in:
@@ -36,10 +36,10 @@ export default class ErrorBoundary extends PureComponent {
|
|||||||
<div className="emptyNewMessage">
|
<div className="emptyNewMessage">
|
||||||
<MdErrorOutline />
|
<MdErrorOutline />
|
||||||
<span className="title">
|
<span className="title">
|
||||||
{variables.getMessage(variables.languagecode, 'modals.main.error_boundary.title')}
|
{variables.getMessage('modals.main.error_boundary.title')}
|
||||||
</span>
|
</span>
|
||||||
<span className="subtitle">
|
<span className="subtitle">
|
||||||
{variables.getMessage(variables.languagecode, 'modals.main.error_boundary.message')}
|
{variables.getMessage('modals.main.error_boundary.message')}
|
||||||
</span>
|
</span>
|
||||||
<div className="buttonsRow">
|
<div className="buttonsRow">
|
||||||
{this.state.showReport ? (
|
{this.state.showReport ? (
|
||||||
@@ -52,7 +52,7 @@ export default class ErrorBoundary extends PureComponent {
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<button className="refresh" onClick={() => window.location.reload()}>
|
<button className="refresh" onClick={() => window.location.reload()}>
|
||||||
{variables.getMessage(variables.languagecode, 'modals.main.error_boundary.refresh')}
|
{variables.getMessage('modals.main.error_boundary.refresh')}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,13 +16,7 @@ export default function KeybindInput(props) {
|
|||||||
<MdCancel />
|
<MdCancel />
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
} else if (
|
} else if (value === variables.getMessage('modals.main.settings.sections.keybinds.recording')) {
|
||||||
value ===
|
|
||||||
variables.getMessage(
|
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.keybinds.recording',
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return (
|
return (
|
||||||
<button className="cleanButton" onClick={() => props.action('cancel', props.setting)}>
|
<button className="cleanButton" onClick={() => props.action('cancel', props.setting)}>
|
||||||
<MdCancel />
|
<MdCancel />
|
||||||
|
|||||||
@@ -25,16 +25,10 @@ export default function ResetModal({ modalClose }) {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<span className="title">
|
<span className="title">
|
||||||
{variables.getMessage(
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.question')}
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.advanced.reset_modal.question',
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<span className="subtitle">
|
<span className="subtitle">
|
||||||
{variables.getMessage(
|
{variables.getMessage('modals.main.settings.sections.advanced.reset_modal.information')}
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.advanced.reset_modal.information',
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<div className="resetFooter">
|
<div className="resetFooter">
|
||||||
<button className="textButton" onClick={modalClose}>
|
<button className="textButton" onClick={modalClose}>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default class SliderComponent extends PureComponent {
|
|||||||
<span>{Number(this.state.value)}</span>
|
<span>{Number(this.state.value)}</span>
|
||||||
<span className="link" onClick={this.resetItem}>
|
<span className="link" onClick={this.resetItem}>
|
||||||
<MdRefresh />
|
<MdRefresh />
|
||||||
{variables.getMessage(variables.languagecode, 'modals.main.settings.buttons.reset')}
|
{variables.getMessage('modals.main.settings.buttons.reset')}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<Slider
|
<Slider
|
||||||
|
|||||||
@@ -44,13 +44,9 @@ export default class Changelog extends PureComponent {
|
|||||||
title: data.title,
|
title: data.title,
|
||||||
date,
|
date,
|
||||||
image: data.featured_image || null,
|
image: data.featured_image || null,
|
||||||
author: variables.getMessage(
|
author: variables.getMessage('modals.main.settings.sections.changelog.by', {
|
||||||
variables.languagecode,
|
author: data.authors.join(', '),
|
||||||
'modals.main.settings.sections.changelog.by',
|
}),
|
||||||
{
|
|
||||||
author: data.authors.join(', '),
|
|
||||||
},
|
|
||||||
),
|
|
||||||
content: data.markdown,
|
content: data.markdown,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -147,13 +147,9 @@ export default class Stats extends PureComponent {
|
|||||||
</span>
|
</span>
|
||||||
<br />
|
<br />
|
||||||
<span className="subtitle">
|
<span className="subtitle">
|
||||||
{variables.getMessage(
|
{variables.getMessage('modals.main.settings.sections.stats.unlocked', {
|
||||||
variables.languagecode,
|
count: this.getUnlockedCount() + '/' + this.state.achievements.length,
|
||||||
'modals.main.settings.sections.stats.unlocked',
|
})}
|
||||||
{
|
|
||||||
count: this.getUnlockedCount() + '/' + this.state.achievements.length,
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
</span>
|
</span>
|
||||||
<div className="achievements">
|
<div className="achievements">
|
||||||
{this.state.achievements.map((achievement, index) => {
|
{this.state.achievements.map((achievement, index) => {
|
||||||
|
|||||||
@@ -70,10 +70,7 @@ export default class Maximise extends PureComponent {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage('modals.main.settings.sections.background.buttons.view')}
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.background.buttons.view',
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<button>
|
<button>
|
||||||
<MdCropFree onClick={this.maximise} className="topicons" />
|
<MdCropFree onClick={this.maximise} className="topicons" />
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function PhotoInformation({ info, url, api }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove unsplash and pexels text
|
// remove unsplash and pexels text
|
||||||
const unsplash = variables.getMessage(variables.languagecode, 'widgets.background.unsplash');
|
const unsplash = variables.getMessage('widgets.background.unsplash');
|
||||||
const pexels = variables.getMessage('widgets.background.pexels');
|
const pexels = variables.getMessage('widgets.background.pexels');
|
||||||
|
|
||||||
let credit = info.credit;
|
let credit = info.credit;
|
||||||
|
|||||||
@@ -56,13 +56,13 @@ export default class Greeting extends PureComponent {
|
|||||||
const hour = now.getHours();
|
const hour = now.getHours();
|
||||||
|
|
||||||
// Set the default greeting string to "Good evening"
|
// Set the default greeting string to "Good evening"
|
||||||
let message = variables.getMessage(variables.languagecode, 'widgets.greeting.evening');
|
let message = variables.getMessage('widgets.greeting.evening');
|
||||||
// If it's before 12am, set the greeting string to "Good morning"
|
// If it's before 12am, set the greeting string to "Good morning"
|
||||||
if (hour < 12) {
|
if (hour < 12) {
|
||||||
message = variables.getMessage('widgets.greeting.morning');
|
message = variables.getMessage('widgets.greeting.morning');
|
||||||
// If it's before 6pm, set the greeting string to "Good afternoon"
|
// If it's before 6pm, set the greeting string to "Good afternoon"
|
||||||
} else if (hour < 18) {
|
} else if (hour < 18) {
|
||||||
message = variables.getMessage(variables.languagecode, 'widgets.greeting.afternoon');
|
message = variables.getMessage('widgets.greeting.afternoon');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events and custom
|
// Events and custom
|
||||||
@@ -100,7 +100,7 @@ export default class Greeting extends PureComponent {
|
|||||||
.split(' ');
|
.split(' ');
|
||||||
message = `${text[0]} ${nth(this.calculateAge(birth))} ${text[1]}`;
|
message = `${text[0]} ${nth(this.calculateAge(birth))} ${text[1]}`;
|
||||||
} else {
|
} else {
|
||||||
message = variables.getMessage(variables.languagecode, 'widgets.greeting.birthday');
|
message = variables.getMessage('widgets.greeting.birthday');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,12 +70,7 @@ export default class Navbar extends PureComponent {
|
|||||||
{localStorage.getItem('todo') === 'true' ? <Todo /> : null}
|
{localStorage.getItem('todo') === 'true' ? <Todo /> : null}
|
||||||
|
|
||||||
{this.refreshEnabled !== 'false' ? (
|
{this.refreshEnabled !== 'false' ? (
|
||||||
<Tooltip
|
<Tooltip title={variables.getMessage('widgets.navbar.tooltips.refresh')}>
|
||||||
title={variables.getMessage(
|
|
||||||
variables.languagecode,
|
|
||||||
'widgets.navbar.tooltips.refresh',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<button onClick={() => this.refresh()}>
|
<button onClick={() => this.refresh()}>
|
||||||
<MdRefresh className="refreshicon topicons" />
|
<MdRefresh className="refreshicon topicons" />
|
||||||
</button>
|
</button>
|
||||||
@@ -90,9 +85,8 @@ export default class Navbar extends PureComponent {
|
|||||||
>
|
>
|
||||||
</InfoTooltip>*/}
|
</InfoTooltip>*/}
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(variables.languagecode, 'modals.main.navbar.settings', {
|
title={variables.getMessage('modals.main.navbar.settings', {
|
||||||
type: variables.getMessage(
|
type: variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.navbar.tooltips.refresh_' + this.refreshValue,
|
'modals.main.navbar.tooltips.refresh_' + this.refreshValue,
|
||||||
),
|
),
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -119,10 +119,7 @@ class Notes extends PureComponent {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
placeholder={variables.getMessage(
|
placeholder={variables.getMessage('widgets.navbar.notes.placeholder')}
|
||||||
variables.languagecode,
|
|
||||||
'widgets.navbar.notes.placeholder',
|
|
||||||
)}
|
|
||||||
value={this.state.notes}
|
value={this.state.notes}
|
||||||
onChange={this.setNotes}
|
onChange={this.setNotes}
|
||||||
minRows={5}
|
minRows={5}
|
||||||
|
|||||||
@@ -179,10 +179,7 @@ class Todo extends PureComponent {
|
|||||||
onClick={() => this.updateTodo('done', index)}
|
onClick={() => this.updateTodo('done', index)}
|
||||||
/>
|
/>
|
||||||
<TextareaAutosize
|
<TextareaAutosize
|
||||||
placeholder={variables.getMessage(
|
placeholder={variables.getMessage('widgets.navbar.notes.placeholder')}
|
||||||
variables.languagecode,
|
|
||||||
'widgets.navbar.notes.placeholder',
|
|
||||||
)}
|
|
||||||
value={this.state.todo[index].value}
|
value={this.state.todo[index].value}
|
||||||
onChange={(data) => this.updateTodo('set', index, data)}
|
onChange={(data) => this.updateTodo('set', index, data)}
|
||||||
readOnly={this.state.todo[index].done}
|
readOnly={this.state.todo[index].done}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default class Weather extends PureComponent {
|
|||||||
|
|
||||||
if (data.cod === '404') {
|
if (data.cod === '404') {
|
||||||
return this.setState({
|
return this.setState({
|
||||||
location: variables.getMessage(variables.languagecode, 'widgets.weather.not_found'),
|
location: variables.getMessage('widgets.weather.not_found'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,13 +187,12 @@ export default class Weather extends PureComponent {
|
|||||||
<div className="expanded-info">
|
<div className="expanded-info">
|
||||||
{weatherType >= 3 && (
|
{weatherType >= 3 && (
|
||||||
<span className="subtitle">
|
<span className="subtitle">
|
||||||
{variables.getMessage(variables.languagecode, 'widgets.weather.extra_information')}
|
{variables.getMessage('widgets.weather.extra_information')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{enabled('cloudiness') ? (
|
{enabled('cloudiness') ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.weather.extra_info.cloudiness',
|
'modals.main.settings.sections.weather.extra_info.cloudiness',
|
||||||
)}
|
)}
|
||||||
placement="left"
|
placement="left"
|
||||||
@@ -207,7 +206,6 @@ export default class Weather extends PureComponent {
|
|||||||
{enabled('windspeed') ? (
|
{enabled('windspeed') ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.weather.extra_info.wind_speed',
|
'modals.main.settings.sections.weather.extra_info.wind_speed',
|
||||||
)}
|
)}
|
||||||
placement="left"
|
placement="left"
|
||||||
@@ -230,7 +228,6 @@ export default class Weather extends PureComponent {
|
|||||||
{enabled('atmosphericpressure') ? (
|
{enabled('atmosphericpressure') ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.weather.extra_info.atmospheric_pressure',
|
'modals.main.settings.sections.weather.extra_info.atmospheric_pressure',
|
||||||
)}
|
)}
|
||||||
placement="left"
|
placement="left"
|
||||||
@@ -245,7 +242,6 @@ export default class Weather extends PureComponent {
|
|||||||
{enabled('weatherdescription') ? (
|
{enabled('weatherdescription') ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.weather.extra_info.show_description',
|
'modals.main.settings.sections.weather.extra_info.show_description',
|
||||||
)}
|
)}
|
||||||
placement="left"
|
placement="left"
|
||||||
@@ -261,7 +257,6 @@ export default class Weather extends PureComponent {
|
|||||||
{enabled('visibility') ? (
|
{enabled('visibility') ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title={variables.getMessage(
|
title={variables.getMessage(
|
||||||
variables.languagecode,
|
|
||||||
'modals.main.settings.sections.weather.extra_info.visibility',
|
'modals.main.settings.sections.weather.extra_info.visibility',
|
||||||
)}
|
)}
|
||||||
placement="left"
|
placement="left"
|
||||||
@@ -294,7 +289,7 @@ export default class Weather extends PureComponent {
|
|||||||
<div className="extra-info">
|
<div className="extra-info">
|
||||||
{/*{enabled('humidity') ? <span><WiHumidity/>{this.state.weather.humidity}%</span> : null}*/}
|
{/*{enabled('humidity') ? <span><WiHumidity/>{this.state.weather.humidity}%</span> : null}*/}
|
||||||
<span>
|
<span>
|
||||||
{variables.getMessage(variables.languagecode, 'widgets.weather.feels_like', {
|
{variables.getMessage('widgets.weather.feels_like', {
|
||||||
amount: this.state.weather.temp_feels_like + this.state.temp_text,
|
amount: this.state.weather.temp_feels_like + this.state.temp_text,
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user