From 8a891d750d780bfde7c2e1a593a45a961b19ee71 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Thu, 28 Nov 2024 17:59:10 +0100 Subject: [PATCH] Add missing translations --- web/src/ui/i18n/resources/de.tsx | 6 ++++++ web/src/ui/i18n/resources/en.tsx | 6 ++++++ web/src/ui/i18n/resources/es.tsx | 6 ++++++ web/src/ui/i18n/resources/fi.tsx | 6 ++++++ web/src/ui/i18n/resources/fr.tsx | 6 ++++++ web/src/ui/i18n/resources/it.tsx | 6 ++++++ web/src/ui/i18n/resources/nl.tsx | 6 ++++++ web/src/ui/i18n/resources/no.tsx | 6 ++++++ web/src/ui/i18n/resources/zh-CN.tsx | 5 +++++ web/src/ui/i18n/types.ts | 1 + .../ConfigurationTopLevelGroup.tsx | 20 ++++++++++++++----- 11 files changed, 69 insertions(+), 5 deletions(-) diff --git a/web/src/ui/i18n/resources/de.tsx b/web/src/ui/i18n/resources/de.tsx index 22671b2e2..0d317eeed 100644 --- a/web/src/ui/i18n/resources/de.tsx +++ b/web/src/ui/i18n/resources/de.tsx @@ -679,6 +679,12 @@ Fühlen Sie sich frei, Ihre Kubernetes-Bereitstellungen zu erkunden und die Kont FormFieldWrapper: { "reset to default": "Zurücksetzen auf Standardwert" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Verschiedenes", + "Configuration that applies to all charts": + "Konfiguration, die für alle Diagramme gilt", + "Top level configuration values": "Konfigurationswerte auf oberster Ebene" + }, YamlCodeBlockFormField: { "not an array": "Ein Array wird erwartet", "not an object": "Ein Objekt wird erwartet", diff --git a/web/src/ui/i18n/resources/en.tsx b/web/src/ui/i18n/resources/en.tsx index e6c28a033..249f16018 100644 --- a/web/src/ui/i18n/resources/en.tsx +++ b/web/src/ui/i18n/resources/en.tsx @@ -667,6 +667,12 @@ Feel free to explore and take charge of your Kubernetes deployments! FormFieldWrapper: { "reset to default": "Reset to default" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Miscellaneous", + "Configuration that applies to all charts": + "Configuration that applies to all charts", + "Top level configuration values": "Top level configuration values" + }, YamlCodeBlockFormField: { "not an array": "An array is expected", "not an object": "An object is expected", diff --git a/web/src/ui/i18n/resources/es.tsx b/web/src/ui/i18n/resources/es.tsx index 8a624c46f..fb99247f4 100644 --- a/web/src/ui/i18n/resources/es.tsx +++ b/web/src/ui/i18n/resources/es.tsx @@ -675,6 +675,12 @@ export const translations: Translations<"en"> = { FormFieldWrapper: { "reset to default": "Restablecer a los valores predeterminados" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Varios", + "Configuration that applies to all charts": + "Configuración que se aplica a todos los gráficos", + "Top level configuration values": "Valores de configuración de nivel superior" + }, YamlCodeBlockFormField: { "not an array": "Se espera un arreglo", "not an object": "Se espera un objeto", diff --git a/web/src/ui/i18n/resources/fi.tsx b/web/src/ui/i18n/resources/fi.tsx index ccf531483..1d19cdd11 100644 --- a/web/src/ui/i18n/resources/fi.tsx +++ b/web/src/ui/i18n/resources/fi.tsx @@ -667,6 +667,12 @@ Tutustu vapaasti ja ota hallintaan Kubernetes-julkaisusi! FormFieldWrapper: { "reset to default": "Palauta oletusarvoon" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Sekalaista", + "Configuration that applies to all charts": + "Konfiguraatio, joka koskee kaikkia kaavioita", + "Top level configuration values": "Ylimmän tason konfiguraatioväriarvot" + }, YamlCodeBlockFormField: { "not an array": "Taulukkoa odotetaan", "not an object": "Oliota odotetaan", diff --git a/web/src/ui/i18n/resources/fr.tsx b/web/src/ui/i18n/resources/fr.tsx index 469a7ae65..c6aa4393d 100644 --- a/web/src/ui/i18n/resources/fr.tsx +++ b/web/src/ui/i18n/resources/fr.tsx @@ -680,6 +680,12 @@ N'hésitez pas à explorer et à prendre en main vos déploiements Kubernetes ! FormFieldWrapper: { "reset to default": "Réinitialiser à la valeur par défaut" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Sekalaista", + "Configuration that applies to all charts": + "Konfiguraatio, joka koskee kaikkia kaavioita", + "Top level configuration values": "Ylimmän tason konfiguraatioväriarvot" + }, YamlCodeBlockFormField: { "not an array": "Un tableau est attendu", "not an object": "Un objet est attendu", diff --git a/web/src/ui/i18n/resources/it.tsx b/web/src/ui/i18n/resources/it.tsx index a441e61e8..d50217af2 100644 --- a/web/src/ui/i18n/resources/it.tsx +++ b/web/src/ui/i18n/resources/it.tsx @@ -674,6 +674,12 @@ Sentiti libero di esplorare e prendere il controllo dei tuoi deployment Kubernet FormFieldWrapper: { "reset to default": "Ripristina il valore predefinito" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Varie", + "Configuration that applies to all charts": + "Configurazione che si applica a tutti i grafici", + "Top level configuration values": "Valori di configurazione di livello superiore" + }, YamlCodeBlockFormField: { "not an array": "È previsto un array", "not an object": "È previsto un oggetto", diff --git a/web/src/ui/i18n/resources/nl.tsx b/web/src/ui/i18n/resources/nl.tsx index 3ab4fcedf..f1efc7507 100644 --- a/web/src/ui/i18n/resources/nl.tsx +++ b/web/src/ui/i18n/resources/nl.tsx @@ -677,6 +677,12 @@ Voel je vrij om te verkennen en de controle over je Kubernetes-implementaties te FormFieldWrapper: { "reset to default": "Terugzetten naar standaardwaarden" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Diverse", + "Configuration that applies to all charts": + "Configuratie die op alle grafieken van toepassing is", + "Top level configuration values": "Configuratiewaarden op het hoogste niveau" + }, YamlCodeBlockFormField: { "not an array": "Een array wordt verwacht", "not an object": "Een object wordt verwacht", diff --git a/web/src/ui/i18n/resources/no.tsx b/web/src/ui/i18n/resources/no.tsx index 9b358b107..ccde391fc 100644 --- a/web/src/ui/i18n/resources/no.tsx +++ b/web/src/ui/i18n/resources/no.tsx @@ -674,6 +674,12 @@ Utforsk gjerne og ta kontroll over tjenestene du kjører på Kubernetes! FormFieldWrapper: { "reset to default": "Tilbakestill til standard" }, + ConfigurationTopLevelGroup: { + miscellaneous: "Diverse", + "Configuration that applies to all charts": + "Konfigurasjon som gjelder for alle diagrammer", + "Top level configuration values": "Konfigurasjonsverdier på toppnivå" + }, YamlCodeBlockFormField: { "not an array": "En matrise forventes", "not an object": "Et objekt forventes", diff --git a/web/src/ui/i18n/resources/zh-CN.tsx b/web/src/ui/i18n/resources/zh-CN.tsx index eb6ceb547..beb5c9c04 100644 --- a/web/src/ui/i18n/resources/zh-CN.tsx +++ b/web/src/ui/i18n/resources/zh-CN.tsx @@ -628,6 +628,11 @@ ${ FormFieldWrapper: { "reset to default": "重置为默认值" }, + ConfigurationTopLevelGroup: { + miscellaneous: "杂项", + "Configuration that applies to all charts": "适用于所有图表的配置", + "Top level configuration values": "顶级配置值" + }, YamlCodeBlockFormField: { "not an array": "需要是数组", "not an object": "需要是对象", diff --git a/web/src/ui/i18n/types.ts b/web/src/ui/i18n/types.ts index c719bff0a..1a30070e1 100644 --- a/web/src/ui/i18n/types.ts +++ b/web/src/ui/i18n/types.ts @@ -56,6 +56,7 @@ export type ComponentKey = | import("ui/pages/launcher/LauncherDialogs/AutoLaunchDisabledDialog").I18n | import("ui/pages/launcher/LauncherDialogs/NoLongerBookmarkedDialog").I18n | import("ui/pages/launcher/RootFormComponent/formFields/shared/FormFieldWrapper").I18n + | import("ui/pages/launcher/RootFormComponent/ConfigurationTopLevelGroup").I18n | import("ui/pages/launcher/RootFormComponent/formFields/YamlCodeBlockFormField").I18n | import("ui/pages/launcher/RootFormComponent/formFields/TextFormField").I18n | import("ui/pages/launcher/RootFormComponent/formFields/NumberFormField").I18n diff --git a/web/src/ui/pages/launcher/RootFormComponent/ConfigurationTopLevelGroup.tsx b/web/src/ui/pages/launcher/RootFormComponent/ConfigurationTopLevelGroup.tsx index 36619246e..04b8b4768 100644 --- a/web/src/ui/pages/launcher/RootFormComponent/ConfigurationTopLevelGroup.tsx +++ b/web/src/ui/pages/launcher/RootFormComponent/ConfigurationTopLevelGroup.tsx @@ -11,6 +11,7 @@ import { createObjectThatThrowsIfAccessed, isObjectThatThrowIfAccessed } from "clean-architecture/createObjectThatThrowsIfAccessed"; +import { declareComponentKeys, useTranslation } from "ui/i18n"; type Props = { className?: string; @@ -24,6 +25,8 @@ export function ConfigurationTopLevelGroup(props: Props) { const { cx, classes } = useStyles(); + const { t } = useTranslation({ ConfigurationTopLevelGroup }); + const { accordionEntries } = useMemo(() => { const { main_formFieldGroups, main_formFields } = (() => { const main_formFields: Exclude[] = []; @@ -57,7 +60,7 @@ export function ConfigurationTopLevelGroup(props: Props) { helmValuesPath: createObjectThatThrowsIfAccessed<(string | number)[]>(), title: "global", - description: "configuration that applies to all charts", + description: t("Configuration that applies to all charts"), canAdd: false, canRemove: false, nodes: global, @@ -70,9 +73,8 @@ export function ConfigurationTopLevelGroup(props: Props) { id({ helmValuesPath: createObjectThatThrowsIfAccessed<(string | number)[]>(), - // TODO: i18n - title: "miscellaneous", - description: "Top level configuration values", + title: t("miscellaneous"), + description: t("Top level configuration values"), canAdd: false, canRemove: false, nodes: main_formFields, @@ -118,7 +120,7 @@ export function ConfigurationTopLevelGroup(props: Props) { ]; return { accordionEntries }; - }, [main]); + }, [main, t]); return (
@@ -162,3 +164,11 @@ const useStyles = tss.withName({ ConfigurationTopLevelGroup }).create(({ theme } overflow: "hidden" } })); + +const { i18n } = declareComponentKeys< + | "miscellaneous" + | "Configuration that applies to all charts" + | "Top level configuration values" +>()({ ConfigurationTopLevelGroup }); + +export type I18n = typeof i18n;