From 0fd50e949c833c701887c5fac0744cc5feeab116 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 17 Sep 2021 14:13:31 +0100 Subject: [PATCH] refactor(translations): cleanup and fix import settings text --- src/components/modals/feedback/Feedback.jsx | 21 +++--- .../modals/main/marketplace/Item.jsx | 13 ++-- .../main/marketplace/sections/Added.jsx | 21 +++--- .../main/marketplace/sections/Create.jsx | 47 ++++++------ .../main/marketplace/sections/Marketplace.jsx | 27 ++++--- .../main/marketplace/sections/Sideload.jsx | 9 +-- .../modals/main/settings/FileUpload.jsx | 5 +- .../modals/main/settings/sections/About.jsx | 45 ++++++------ .../main/settings/sections/Advanced.jsx | 33 ++++----- .../main/settings/sections/Appearance.jsx | 72 +++++++++--------- .../main/settings/sections/Changelog.jsx | 9 +-- .../modals/main/settings/sections/Order.jsx | 21 +++--- .../main/settings/sections/QuickLinks.jsx | 17 ++--- .../modals/main/settings/sections/Quote.jsx | 47 ++++++------ .../modals/main/settings/sections/Search.jsx | 23 +++--- .../modals/main/settings/sections/Stats.jsx | 27 ++++--- .../modals/main/settings/sections/Time.jsx | 73 +++++++++---------- .../modals/main/settings/sections/Weather.jsx | 41 +++++------ .../sections/background/Background.jsx | 15 ++-- .../settings/sections/background/Colour.jsx | 13 ++-- src/components/modals/main/tabs/Addons.jsx | 9 +-- .../modals/main/tabs/Marketplace.jsx | 9 +-- src/components/modals/main/tabs/Settings.jsx | 37 +++++----- .../modals/main/tabs/backend/Tab.jsx | 57 +++++++-------- src/components/modals/welcome/Welcome.jsx | 17 ++--- .../modals/welcome/WelcomeSections.jsx | 69 +++++++++--------- .../widgets/quicklinks/QuickLinks.jsx | 17 ++--- src/modules/helpers/settings/modals.js | 5 +- 28 files changed, 386 insertions(+), 413 deletions(-) diff --git a/src/components/modals/feedback/Feedback.jsx b/src/components/modals/feedback/Feedback.jsx index 49338492..98fb0126 100644 --- a/src/components/modals/feedback/Feedback.jsx +++ b/src/components/modals/feedback/Feedback.jsx @@ -4,8 +4,7 @@ import { PureComponent } from 'react'; import './feedback.scss'; export default class FeedbackModal extends PureComponent { - getMessage = (languagecode, text) => variables.language.getMessage(languagecode, text); - languagecode = variables.languagecode; + getMessage = (text) => variables.language.getMessage(variables.languagecode, text); constructor() { super(); @@ -30,11 +29,11 @@ export default class FeedbackModal extends PureComponent { let question_two_error, question_four_error; if (this.state.question_two.value.length <= 0) { - question_two_error = this.getMessage(this.languagecode, 'modals.feedback.not_filled'); + question_two_error = this.getMessage('modals.feedback.not_filled'); } if (this.state.question_four.value.length <= 0) { - question_four_error = this.getMessage(this.languagecode, 'modals.feedback.not_filled'); + question_four_error = this.getMessage('modals.feedback.not_filled'); } if (question_two_error || question_four_error) { @@ -61,7 +60,7 @@ export default class FeedbackModal extends PureComponent { }); this.setState({ - formsubmit: this.getMessage(this.languagecode, 'modals.feedback.success') + formsubmit: this.getMessage('modals.feedback.success') }); setTimeout(() => { @@ -73,36 +72,36 @@ export default class FeedbackModal extends PureComponent { render() { return (
-

{this.getMessage(this.languagecode, 'modals.feedback.title')}

+

{this.getMessage('modals.feedback.title')}

×
- +

this.setState({ question_one: e.target.value })}/>
- +