From cf39845892b7b51ed6ac9bdf6562818ea0b9b57e Mon Sep 17 00:00:00 2001 From: David Ralph Date: Sun, 14 Nov 2021 16:01:45 +0000 Subject: [PATCH] fix(translations): add missing translations --- src/components/modals/main/marketplace/Item.jsx | 4 ++-- .../modals/main/marketplace/sections/Added.jsx | 8 +++++--- .../modals/main/marketplace/sections/Create.jsx | 13 +++++-------- .../modals/main/settings/sections/Language.jsx | 6 +++--- .../modals/main/settings/sections/Quote.jsx | 2 +- src/translations/de_DE.json | 7 ++++++- src/translations/en_GB.json | 9 +++++++-- src/translations/en_US.json | 7 ++++++- src/translations/es.json | 7 ++++++- src/translations/fr.json | 7 ++++++- src/translations/nl.json | 7 ++++++- src/translations/no.json | 7 ++++++- src/translations/ru.json | 7 ++++++- src/translations/zh_CN.json | 7 ++++++- 14 files changed, 71 insertions(+), 27 deletions(-) diff --git a/src/components/modals/main/marketplace/Item.jsx b/src/components/modals/main/marketplace/Item.jsx index 123ecf61..c3b81db6 100644 --- a/src/components/modals/main/marketplace/Item.jsx +++ b/src/components/modals/main/marketplace/Item.jsx @@ -20,7 +20,7 @@ export default class Item extends PureComponent { updateAddon() { uninstall(this.props.data.type, this.props.data.display_name); install(this.props.data.type, this.props.data); - toast('Successfully updated!'); + toast(variables.language.getMessage(variables.languagecode, 'toasts.updated')); this.setState({ showUpdateButton: false }); @@ -57,7 +57,7 @@ export default class Item extends PureComponent {

); diff --git a/src/components/modals/main/marketplace/sections/Added.jsx b/src/components/modals/main/marketplace/sections/Added.jsx index 687634b8..ced67a74 100644 --- a/src/components/modals/main/marketplace/sections/Added.jsx +++ b/src/components/modals/main/marketplace/sections/Added.jsx @@ -102,9 +102,11 @@ export default class Added extends PureComponent { }); if (updates > 0) { - toast('Updates available: ' + updates); + toast(this.getMessage('modals.main.addons.updates_available', { + amount: updates + })); } else { - toast('No updates available'); + toast(this.getMessage('modals.main.addons.no_updates')); } } @@ -137,7 +139,7 @@ export default class Added extends PureComponent { - +
this.toggle('item', input)} /> diff --git a/src/components/modals/main/marketplace/sections/Create.jsx b/src/components/modals/main/marketplace/sections/Create.jsx index db487dc4..c5cfd9ac 100644 --- a/src/components/modals/main/marketplace/sections/Create.jsx +++ b/src/components/modals/main/marketplace/sections/Create.jsx @@ -254,16 +254,13 @@ export default class Create extends PureComponent { {this.state.addonMetadata.type === 'quote_api' ? <>

{getMessage('modals.main.addons.create.quotes.api.title')}

-

{getMessage('modals.main.addons.create.quotes.api.url')}

- this.updateQuotePackAPI('url', e.target.value)}/> -

{getMessage('modals.main.addons.create.quotes.api.name')}

- this.updateQuotePackAPI('name', e.target.value)}/> -

{getMessage('modals.main.addons.create.quotes.api.author')}

- this.updateQuotePackAPI('author', e.target.value)}/> + this.updateQuotePack(e.target.value, 'url')}/> + this.updateQuotePack(e.target.value, 'name')}/> + this.updateQuotePack(e.target.value, 'author')}/>

: <>

{getMessage('modals.main.addons.create.quotes.local.title')}

- +

} @@ -277,7 +274,7 @@ export default class Create extends PureComponent { <>

{getMessage('modals.main.addons.create.photos.title')}

{getMessage('modals.main.addons.create.quotes.local.title')}

- +

diff --git a/src/components/modals/main/settings/sections/Language.jsx b/src/components/modals/main/settings/sections/Language.jsx index dc8e1537..761dc4a7 100644 --- a/src/components/modals/main/settings/sections/Language.jsx +++ b/src/components/modals/main/settings/sections/Language.jsx @@ -26,16 +26,16 @@ export default class LanguageSettings extends PureComponent { return; } - let array = []; + const quoteLanguages = []; data.forEach((item) => { - array.push({ + quoteLanguages.push({ name: item, value: item }); }); this.setState({ - quoteLanguages: array + quoteLanguages }); } diff --git a/src/components/modals/main/settings/sections/Quote.jsx b/src/components/modals/main/settings/sections/Quote.jsx index d1ab5c15..3a5b7ac5 100644 --- a/src/components/modals/main/settings/sections/Quote.jsx +++ b/src/components/modals/main/settings/sections/Quote.jsx @@ -1,5 +1,5 @@ import variables from 'modules/variables'; -import { PureComponent, Fragment } from 'react'; +import { PureComponent } from 'react'; import { Cancel, Add } from '@mui/icons-material'; import { TextField } from '@mui/material'; diff --git a/src/translations/de_DE.json b/src/translations/de_DE.json index f9d4e73e..2ed82d99 100644 --- a/src/translations/de_DE.json +++ b/src/translations/de_DE.json @@ -406,7 +406,8 @@ "author": "Autor", "buttons": { "addtomue": "Zu Mue hinzufügen", - "remove": "Entfernen" + "remove": "Entfernen", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Warnung", @@ -420,6 +421,9 @@ }, "addons": { "added": "Hinzugefügt", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Hier ist es leer", "description": "Gehen Sie zum Marktplatz, um einige hinzuzufügen" @@ -546,6 +550,7 @@ "reset": "Reset successfully", "installed": "Erfolgreich installiert", "uninstalled": "Erfolgreich entfernt", + "updated": "Successfully updated", "error": "Etwas ist schief gelaufen", "imported": "Erfolgreich importiert" } diff --git a/src/translations/en_GB.json b/src/translations/en_GB.json index 7cc44bb7..d5b3328b 100644 --- a/src/translations/en_GB.json +++ b/src/translations/en_GB.json @@ -405,7 +405,8 @@ "author": "Author", "buttons": { "addtomue": "Add To Mue", - "remove": "Remove" + "remove": "Remove", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Warning", @@ -419,6 +420,9 @@ }, "addons": { "added": "Added", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Empty", "description": "No addons are installed" @@ -455,7 +459,7 @@ "download": "Download Add-on" }, "settings": { - "current": "Import current setup", + "current": "Import current", "json": "Upload JSON" }, "photos": { @@ -545,6 +549,7 @@ "reset": "Reset successfully", "installed": "Successfully installed", "uninstalled": "Successfully removed", + "updated": "Successfully updated", "error": "Something went wrong", "imported": "Successfully imported" } diff --git a/src/translations/en_US.json b/src/translations/en_US.json index a71c53f0..5d4a37ce 100644 --- a/src/translations/en_US.json +++ b/src/translations/en_US.json @@ -405,7 +405,8 @@ "author": "Author", "buttons": { "addtomue": "Add To Mue", - "remove": "Remove" + "remove": "Remove", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Warning", @@ -419,6 +420,9 @@ }, "addons": { "added": "Added", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Empty", "description": "No addons are installed" @@ -545,6 +549,7 @@ "reset": "Reset successfully", "installed": "Successfully installed", "uninstalled": "Successfully removed", + "updated": "Successfully updated", "error": "Something went wrong", "imported": "Successfully imported" } diff --git a/src/translations/es.json b/src/translations/es.json index 29adfc2a..b84d48f1 100644 --- a/src/translations/es.json +++ b/src/translations/es.json @@ -405,7 +405,8 @@ "author": "Autor", "buttons": { "addtomue": "Añadir a Mue", - "remove": "Desinstalar" + "remove": "Desinstalar", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Advertencia", @@ -419,6 +420,9 @@ }, "addons": { "added": "Añadidos", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Vacío", "description": "Dirígete a la tienda para agregar algunos." @@ -545,6 +549,7 @@ "reset": "Restablecido correctamente", "installed": "Instalado correctamente", "uninstalled": "Desinstalado correctamente", + "updated": "Successfully updated", "error": "Algo salió mal", "imported": "Importado correctamente" } diff --git a/src/translations/fr.json b/src/translations/fr.json index 89c3ce60..ccc982e1 100644 --- a/src/translations/fr.json +++ b/src/translations/fr.json @@ -405,7 +405,8 @@ "author": "Auteur", "buttons": { "addtomue": "Ajouter à Mue", - "remove": "Enlever" + "remove": "Enlever", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Warning", @@ -419,6 +420,9 @@ }, "addons": { "added": "Ajoutées", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "C'est vide par ici", "description": "Dirigez vous vers le marché pour ajouter des options" @@ -545,6 +549,7 @@ "reset": "Réinitialisé avec succès", "installed": "Installé avec succès", "uninstalled": "Enlevé avec succès", + "updated": "Successfully updated", "error": "Quelque chose s'est mal passé", "imported": "Importé avec succès" } diff --git a/src/translations/nl.json b/src/translations/nl.json index 60b42388..782f345a 100644 --- a/src/translations/nl.json +++ b/src/translations/nl.json @@ -405,7 +405,8 @@ "author": "Maker", "buttons": { "addtomue": "Toevoegen aan Mue", - "remove": "Verwijderen" + "remove": "Verwijderen", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Waarschuwing", @@ -419,6 +420,9 @@ }, "addons": { "added": "Toegevoegd", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Het is hier erg leeg", "description": "Ga naar de marktplaats om een paar extensies toe te voegen" @@ -545,6 +549,7 @@ "reset": "Het herstellen is voltooid", "installed": "De installatie is voltooid", "uninstalled": "Het verwijderen is voltooid", + "updated": "Successfully updated", "error": "Er is iets misgegaan", "imported": "Het importeren is voltooid" } diff --git a/src/translations/no.json b/src/translations/no.json index 86610d6b..fd258c2e 100644 --- a/src/translations/no.json +++ b/src/translations/no.json @@ -405,7 +405,8 @@ "author": "Forfatter", "buttons": { "addtomue": "Legg Til Mue", - "remove": "Fjern" + "remove": "Fjern", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Warning", @@ -419,6 +420,9 @@ }, "addons": { "added": "Lagt til", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Det er tomt her.", "description": "Gå til markedsplassen å legg til noe" @@ -545,6 +549,7 @@ "reset": "Tilbakestillte vellykket", "installed": "Installert", "uninstalled": "Fjernet", + "updated": "Successfully updated", "error": "Noe gikk galt", "imported": "Successfully imported" } diff --git a/src/translations/ru.json b/src/translations/ru.json index f287c552..2382f145 100644 --- a/src/translations/ru.json +++ b/src/translations/ru.json @@ -405,7 +405,8 @@ "author": "Автор", "buttons": { "addtomue": "Добавить в Mue", - "remove": "Удалить" + "remove": "Удалить", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "Предупреждение", @@ -419,6 +420,9 @@ }, "addons": { "added": "Добавлен", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "Здесь пусто", "description": "Зайдите в магазин, чтобы найти что-то интересное" @@ -546,6 +550,7 @@ "reset": "Сброшено", "installed": "Успешно установлено", "uninstalled": "Успешно удалено", + "updated": "Successfully updated", "error": "Что-то пошло не так", "imported": "Успешно импортировано" } diff --git a/src/translations/zh_CN.json b/src/translations/zh_CN.json index 450e7c6e..7a10b7b2 100644 --- a/src/translations/zh_CN.json +++ b/src/translations/zh_CN.json @@ -405,7 +405,8 @@ "author": "作者", "buttons": { "addtomue": "添加至 Mue", - "remove": "卸载" + "remove": "卸载", + "update_addon": "Update Add-on" }, "quote_warning": { "title": "注意", @@ -419,6 +420,9 @@ }, "addons": { "added": "已添加", + "check_updates": "Check for updates", + "no_updates": "No updates available", + "updates_available": "Updates avaialble {amount}", "empty": { "title": "这里空空如也", "description": "请访问插件市场来添加插件。" @@ -545,6 +549,7 @@ "reset": "重置成功", "installed": "安装成功", "uninstalled": "卸载成功", + "updated": "Successfully updated", "error": "发生错误", "imported": "导入成功" }