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