From f413f4e31c86585f8ce8679d8185de2c878c140a Mon Sep 17 00:00:00 2001 From: David Ralph Date: Sat, 4 Jun 2022 11:58:01 +0100 Subject: [PATCH] feat(translations): bug fixes, more 7.0 support --- .../modals/main/marketplace/Item.jsx | 26 +++++++++---------- .../modals/main/marketplace/Items.jsx | 12 +++++---- .../main/marketplace/sections/Create.jsx | 4 +-- .../main/marketplace/sections/Marketplace.jsx | 6 ++--- .../main/scss/modules/_tab-content.scss | 11 +++++--- .../modals/main/settings/Header.jsx | 6 ++--- .../modals/main/settings/sections/Message.jsx | 10 +++---- .../modals/main/settings/sections/Navbar.jsx | 2 +- .../modals/main/settings/sections/Quote.jsx | 4 +-- .../modals/main/settings/sections/Stats.jsx | 2 +- .../modals/main/settings/sections/Time.jsx | 6 ++--- .../settings/sections/advanced/Advanced.jsx | 11 ++++---- .../settings/sections/background/Custom.jsx | 17 +++++++++--- src/translations/de_DE.json | 25 ++++++++++++++++-- src/translations/en_GB.json | 25 ++++++++++++++++-- src/translations/en_US.json | 25 ++++++++++++++++-- src/translations/es.json | 25 ++++++++++++++++-- src/translations/fr.json | 25 ++++++++++++++++-- src/translations/id_ID.json | 25 ++++++++++++++++-- src/translations/nl.json | 25 ++++++++++++++++-- src/translations/no.json | 25 ++++++++++++++++-- src/translations/ru.json | 25 ++++++++++++++++-- src/translations/zh_CN.json | 25 ++++++++++++++++-- 23 files changed, 296 insertions(+), 71 deletions(-) diff --git a/src/components/modals/main/marketplace/Item.jsx b/src/components/modals/main/marketplace/Item.jsx index ed839f29..4ff8223a 100644 --- a/src/components/modals/main/marketplace/Item.jsx +++ b/src/components/modals/main/marketplace/Item.jsx @@ -113,7 +113,7 @@ export default class Item extends PureComponent { - Marketplace + {getMessage('modals.main.navbar.marketplace')}
@@ -127,7 +127,7 @@ export default class Item extends PureComponent { src={iconsrc} onClick={() => this.setState({ showLightbox: true })} /> - Description + {getMessage('modals.main.marketplace.product.description')} this.toggleShowMore()}> {this.state.showMore === true ? ( <> - Show Less + {getMessage('modals.main.marketplace.product.show_less')} ) : ( <> - Show More + {getMessage('modals.main.marketplace.product.show_more')} )} @@ -176,7 +176,7 @@ export default class Item extends PureComponent {
- No. Quotes + {getMessage('modals.main.marketplace.product.no_quotes')} {this.props.data.data.quotes.length}
@@ -185,7 +185,7 @@ export default class Item extends PureComponent {
- No. Images + {getMessage('modals.main.marketplace.product.no_images')} {this.props.data.data.photos.length}
@@ -194,18 +194,18 @@ export default class Item extends PureComponent {
- Language + {getMessage('modals.main.settings.sections.language')} {this.props.data.data.language}
) : null} -
+ {/*
- Shares + {getMessage('modals.main.marketplace.product.shares')} 324
-
+
*/}
@@ -237,9 +237,9 @@ export default class Item extends PureComponent {
{this.props.data.data.collection ? (
- Part of - Red Dead Collection - + {getMessage('modals.main.marketplace.product.part_of')} + {this.props.data.data.collection} +
) : null} {warningHTML} diff --git a/src/components/modals/main/marketplace/Items.jsx b/src/components/modals/main/marketplace/Items.jsx index d082ce98..20b40d6a 100644 --- a/src/components/modals/main/marketplace/Items.jsx +++ b/src/components/modals/main/marketplace/Items.jsx @@ -9,6 +9,8 @@ export default function Items({ collectionFunction, onCollection, }) { + const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); + return ( <> {type === 'all' && !onCollection ? ( @@ -19,7 +21,7 @@ export default function Items({ {collection.display_name} {collection.description} @@ -44,13 +46,13 @@ export default function Items({ {type === 'all' && !onCollection ? (
- Can't find what you're looking for? + {getMessage('modals.main.marketplace.cant_find')} - Visit the{' '} + {getMessage('modals.main.marketplace.knowledgebase_one')}{' '} - knowledgebase + {getMessage('modals.main.marketplace.knowledgebase_two')} {' '} - to create your own. + {getMessage('modals.main.marketplace.knowledgebase_three')}
) : null} diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx index 3c4b206b..a42f29b5 100644 --- a/src/components/modals/main/marketplace/sections/Create.jsx +++ b/src/components/modals/main/marketplace/sections/Create.jsx @@ -147,7 +147,7 @@ export default class Create extends PureComponent { const chooseType = ( <> -
+ {/*
Help Centre @@ -158,7 +158,7 @@ export default class Create extends PureComponent { Open Site -
+
*/}
this.changeTab(2, 'photos')}> diff --git a/src/components/modals/main/marketplace/sections/Marketplace.jsx b/src/components/modals/main/marketplace/sections/Marketplace.jsx index cc61a6a6..d3073953 100644 --- a/src/components/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/components/modals/main/marketplace/sections/Marketplace.jsx @@ -244,7 +244,7 @@ export default class Marketplace extends PureComponent { return errorMessage(
- Loading + {this.getMessage('modals.main.loading')}
, ); } @@ -304,11 +304,11 @@ export default class Marketplace extends PureComponent { this.returnToMain()} />
- Marketplace + {this.getMessage('modals.main.navbar.marketplace')}
) : ( - Marketplace + {this.getMessage('modals.main.navbar.marketplace')} )}
{this.props.title}
- window.open( @@ -39,7 +39,7 @@ export default class Header extends PureComponent { } > {getMessage('modals.main.settings.sections.header.more_info')} - + */} diff --git a/src/components/modals/main/settings/sections/Message.jsx b/src/components/modals/main/settings/sections/Message.jsx index c6f72856..802310c3 100644 --- a/src/components/modals/main/settings/sections/Message.jsx +++ b/src/components/modals/main/settings/sections/Message.jsx @@ -31,7 +31,7 @@ export default class Message extends PureComponent { modifyMessage(type, index) { const messages = this.state.messages; if (type === 'add') { - messages.push(' '); + messages.push(''); } else { messages.splice(index, 1); } @@ -81,15 +81,15 @@ export default class Message extends PureComponent { - - + + {this.state.messages.map((_url, index) => ( - + - + {this.state.customQuote.map((_url, index) => ( - +
MessagesButtons{this.getMessage('modals.main.settings.sections.message.messages')}{this.getMessage('modals.main.settings.sections.quote.custom_buttons')}
this.message(e, true, index)} varient="outlined" /> diff --git a/src/components/modals/main/settings/sections/Navbar.jsx b/src/components/modals/main/settings/sections/Navbar.jsx index 8c60104f..576cbcc8 100644 --- a/src/components/modals/main/settings/sections/Navbar.jsx +++ b/src/components/modals/main/settings/sections/Navbar.jsx @@ -49,7 +49,7 @@ export default function Navbar() { category="navbar" onChange={setShowRefreshOptions} /> - + {showRefreshOptions ? ( {this.getMessage('modals.main.settings.sections.quote.title')} {this.getMessage('modals.main.settings.sections.quote.author')}{this.getMessage('modals.main.settings.sections.custom_buttons')}{this.getMessage('modals.main.settings.sections.quote.custom_buttons')}
- Achievements + {getMessage('modals.main.settings.sections.stats.achievements')}
{this.state.stats['tabs-opened'] >= 10 && achievement('10/10 IGN', 'Opened 10 tabs')} {this.state.stats['tabs-opened'] >= 39 && achievement('Thank you', 'Opened 39 tabs')} diff --git a/src/components/modals/main/settings/sections/Time.jsx b/src/components/modals/main/settings/sections/Time.jsx index f33c7106..a0dbc0f6 100644 --- a/src/components/modals/main/settings/sections/Time.jsx +++ b/src/components/modals/main/settings/sections/Time.jsx @@ -28,7 +28,7 @@ export default class TimeSettings extends PureComponent { const digitalSettings = ( @@ -76,8 +76,7 @@ export default class AdvancedSettings extends PureComponent { {getMessage('modals.main.settings.sections.advanced.data')} - Choose whether to export your Mue settings to your computer, import an existing - settings file, or reset your settings to their default values. + {getMessage('modals.main.settings.sections.advanced.data_subtitle')}
@@ -98,7 +97,7 @@ export default class AdvancedSettings extends PureComponent { ) : null} @@ -113,7 +112,7 @@ export default class AdvancedSettings extends PureComponent { @@ -125,7 +124,7 @@ export default class AdvancedSettings extends PureComponent { /> diff --git a/src/components/modals/main/settings/sections/background/Custom.jsx b/src/components/modals/main/settings/sections/background/Custom.jsx index 202ca35c..ec6d368d 100644 --- a/src/components/modals/main/settings/sections/background/Custom.jsx +++ b/src/components/modals/main/settings/sections/background/Custom.jsx @@ -190,11 +190,20 @@ export default class CustomSettings extends PureComponent {
- Drop to upload - - Available formats, jpeg, png, webp, webm, gif, mp4, webm, ogg + + {this.getMessage('modals.main.settings.sections.background.source.drop_to_upload')} - + + {this.getMessage( + 'modals.main.settings.sections.background.source.available_formats', + { + formats: 'jpeg, png, webp, webm, gif, mp4, webm, ogg', + }, + )} + +