From b8f2b7fb1fb59f930724a4e1c2dd7a2e07badc03 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 26 Aug 2022 11:44:24 +0100 Subject: [PATCH] fix(translations): fix issues caused by refactor --- src/components/modals/ErrorBoundary.jsx | 6 +++--- src/components/modals/main/settings/KeybindInput.jsx | 8 +------- src/components/modals/main/settings/ResetModal.jsx | 10 ++-------- src/components/modals/main/settings/Slider.jsx | 2 +- .../modals/main/settings/sections/Changelog.jsx | 10 +++------- .../modals/main/settings/sections/Stats.jsx | 10 +++------- src/components/widgets/background/Maximise.jsx | 5 +---- .../widgets/background/PhotoInformation.jsx | 2 +- src/components/widgets/greeting/Greeting.jsx | 6 +++--- src/components/widgets/navbar/Navbar.jsx | 10 ++-------- src/components/widgets/navbar/Notes.jsx | 5 +---- src/components/widgets/navbar/Todo.jsx | 5 +---- src/components/widgets/weather/Weather.jsx | 11 +++-------- 13 files changed, 25 insertions(+), 65 deletions(-) diff --git a/src/components/modals/ErrorBoundary.jsx b/src/components/modals/ErrorBoundary.jsx index ab586ee1..a39709ca 100644 --- a/src/components/modals/ErrorBoundary.jsx +++ b/src/components/modals/ErrorBoundary.jsx @@ -36,10 +36,10 @@ export default class ErrorBoundary extends PureComponent {
- {variables.getMessage(variables.languagecode, 'modals.main.error_boundary.title')} + {variables.getMessage('modals.main.error_boundary.title')} - {variables.getMessage(variables.languagecode, 'modals.main.error_boundary.message')} + {variables.getMessage('modals.main.error_boundary.message')}
{this.state.showReport ? ( @@ -52,7 +52,7 @@ export default class ErrorBoundary extends PureComponent { )}
diff --git a/src/components/modals/main/settings/KeybindInput.jsx b/src/components/modals/main/settings/KeybindInput.jsx index ee0d43e7..2c0ea195 100644 --- a/src/components/modals/main/settings/KeybindInput.jsx +++ b/src/components/modals/main/settings/KeybindInput.jsx @@ -16,13 +16,7 @@ export default function KeybindInput(props) { ); - } 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 ( @@ -90,9 +85,8 @@ export default class Navbar extends PureComponent { > */} this.updateTodo('done', index)} /> this.updateTodo('set', index, data)} readOnly={this.state.todo[index].done} diff --git a/src/components/widgets/weather/Weather.jsx b/src/components/widgets/weather/Weather.jsx index 7ff4f4d7..d2bbfdf2 100644 --- a/src/components/widgets/weather/Weather.jsx +++ b/src/components/widgets/weather/Weather.jsx @@ -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 {
{weatherType >= 3 && ( - {variables.getMessage(variables.languagecode, 'widgets.weather.extra_information')} + {variables.getMessage('widgets.weather.extra_information')} )} {enabled('cloudiness') ? ( {/*{enabled('humidity') ? {this.state.weather.humidity}% : null}*/} - {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, })}