diff --git a/frontend/src/components/App/Settings/SettingsCluster.tsx b/frontend/src/components/App/Settings/SettingsCluster.tsx index 21f0a59366..44a6838b29 100644 --- a/frontend/src/components/App/Settings/SettingsCluster.tsx +++ b/frontend/src/components/App/Settings/SettingsCluster.tsx @@ -243,6 +243,62 @@ export default function SettingsCluster() { ], }} > + {helpers.isElectron() && ( + { + let value = event.target.value; + value = value.replace(' ', ''); + setNewClusterName(value); + }} + value={newClusterName} + placeholder={cluster} + error={!isValidCurrentName} + helperText={ + isValidCurrentName + ? t( + 'translation|The current name of cluster. You can define custom modified name.' + ) + : invalidClusterNameMessage + } + InputProps={{ + endAdornment: ( + + { + if (isValidCurrentName) { + handleUpdateClusterName(source); + } + }} + confirmTitle={t('translation|Change name')} + confirmDescription={t( + 'translation|Are you sure you want to change the name for "{{ clusterName }}"?', + { clusterName: cluster } + )} + disabled={!newClusterName || !isValidCurrentName} + > + {t('translation|Apply')} + + + ), + onKeyPress: event => { + if (event.key === 'Enter' && isValidCurrentName) { + handleUpdateClusterName(source); + } + }, + autoComplete: 'off', + sx: { maxWidth: 250 }, + }} + /> + ), + }, + ]} + /> + )} ), }, - { - name: t('translation|Current name'), - value: ( - { - let value = event.target.value; - value = value.replace(' ', ''); - setNewClusterName(value); - }} - value={newClusterName} - placeholder={cluster} - error={!isValidCurrentName} - helperText={ - isValidCurrentName - ? t( - 'translation|The current name of cluster. You can define custom modified name.' - ) - : invalidClusterNameMessage - } - InputProps={{ - endAdornment: ( - - { - if (isValidCurrentName) { - handleUpdateClusterName(source); - } - }} - confirmTitle={t('translation|Change name')} - confirmDescription={t( - 'translation|Are you sure you want to change the name for "{{ clusterName }}"?', - { clusterName: cluster } - )} - disabled={!newClusterName || !isValidCurrentName} - > - {t('translation|Change name')} - - - ), - onKeyPress: event => { - if (event.key === 'Enter' && isValidCurrentName) { - handleUpdateClusterName(source); - } - }, - autoComplete: 'off', - }} - /> - ), - }, ]} /> diff --git a/frontend/src/i18n/locales/de/translation.json b/frontend/src/i18n/locales/de/translation.json index 447079d686..435cc62908 100644 --- a/frontend/src/i18n/locales/de/translation.json +++ b/frontend/src/i18n/locales/de/translation.json @@ -64,14 +64,13 @@ "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.": "", "Cluster Settings ({{ clusterName }})": "Cluster-Einstellungen ({{ clusterName }})", "Cluster Settings": "Cluster-Einstellungen", + "The current name of cluster. You can define custom modified name.": "", + "Change name": "", + "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Default namespace": "Standard-Namespace", "The default namespace for e.g. when applying resources (when not specified directly).": "Der Standard-Namespace z. B. für die Anwendung von Ressourcen (wenn nicht anders angegeben).", "Allowed namespaces": "Erlaubte Namespaces", "The list of namespaces you are allowed to access in this cluster.": "Liste der Namespaces, auf die Sie in diesem Cluster zugreifen dürfen.", - "Current name": "", - "The current name of cluster. You can define custom modified name.": "", - "Change name": "", - "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Remove Cluster": "Cluster entfernen", "Server": "Server", "light theme": "helles Design", @@ -149,8 +148,8 @@ "All namespaces": "Alle Namespaces", "From": "Von", "Age": "Alter", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_plural": "", "Release Notes ({{ appVersion }})": "Versionshinweise ({{ appVersion }})", "Fetching release information…": "Abrufen von Release-Informationen…", "Skip": "Überspringen", @@ -395,5 +394,7 @@ "\"{{metricName}}\" on pods": "\"{{metricName}}\" auf Pods", "resource {{resourceName}} on pods": "Ressource {{resourceName}} auf Pods", "resource {{resourceName}} of container {{containerName}} on pods": "Ressource {{resourceName}} des Containers {{containerName}} auf Pods", - "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Warnung. Inkompatible Plugins deaktiviert: ({{ pluginList }})" + "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Warnung. Inkompatible Plugins deaktiviert: ({{ pluginList }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "" } diff --git a/frontend/src/i18n/locales/de/translation_old.json b/frontend/src/i18n/locales/de/translation_old.json index a70d69de88..77228b015d 100644 --- a/frontend/src/i18n/locales/de/translation_old.json +++ b/frontend/src/i18n/locales/de/translation_old.json @@ -1,3 +1,4 @@ { - "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "" + "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "", + "Current name": "" } diff --git a/frontend/src/i18n/locales/en/translation.json b/frontend/src/i18n/locales/en/translation.json index 4abfa03dbf..cfe6837e11 100644 --- a/frontend/src/i18n/locales/en/translation.json +++ b/frontend/src/i18n/locales/en/translation.json @@ -64,14 +64,13 @@ "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.": "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.", "Cluster Settings ({{ clusterName }})": "Cluster Settings ({{ clusterName }})", "Cluster Settings": "Cluster Settings", + "The current name of cluster. You can define custom modified name.": "The current name of cluster. You can define custom modified name.", + "Change name": "Change name", + "Are you sure you want to change the name for \"{{ clusterName }}\"?": "Are you sure you want to change the name for \"{{ clusterName }}\"?", "Default namespace": "Default namespace", "The default namespace for e.g. when applying resources (when not specified directly).": "The default namespace for e.g. when applying resources (when not specified directly).", "Allowed namespaces": "Allowed namespaces", "The list of namespaces you are allowed to access in this cluster.": "The list of namespaces you are allowed to access in this cluster.", - "Current name": "Current name", - "The current name of cluster. You can define custom modified name.": "The current name of cluster. You can define custom modified name.", - "Change name": "Change name", - "Are you sure you want to change the name for \"{{ clusterName }}\"?": "Are you sure you want to change the name for \"{{ clusterName }}\"?", "Remove Cluster": "Remove Cluster", "Server": "Server", "light theme": "light theme", @@ -149,8 +148,8 @@ "All namespaces": "All namespaces", "From": "From", "Age": "Age", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_plural": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})", "Release Notes ({{ appVersion }})": "Release Notes ({{ appVersion }})", "Fetching release information…": "Fetching release information…", "Skip": "Skip", @@ -395,5 +394,7 @@ "\"{{metricName}}\" on pods": "\"{{metricName}}\" on pods", "resource {{resourceName}} on pods": "resource {{resourceName}} on pods", "resource {{resourceName}} of container {{containerName}} on pods": "resource {{resourceName}} of container {{containerName}} on pods", - "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Warning. Incompatible plugins disabled: ({{ pluginList }})" + "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Warning. Incompatible plugins disabled: ({{ pluginList }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})" } diff --git a/frontend/src/i18n/locales/en/translation_old.json b/frontend/src/i18n/locales/en/translation_old.json index c27703c67d..2dd12374b4 100644 --- a/frontend/src/i18n/locales/en/translation_old.json +++ b/frontend/src/i18n/locales/en/translation_old.json @@ -1,3 +1,4 @@ { - "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?" + "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?", + "Current name": "Current name" } diff --git a/frontend/src/i18n/locales/es/translation.json b/frontend/src/i18n/locales/es/translation.json index a4c0a6e57d..5e70b46dfd 100644 --- a/frontend/src/i18n/locales/es/translation.json +++ b/frontend/src/i18n/locales/es/translation.json @@ -64,14 +64,13 @@ "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.": "", "Cluster Settings ({{ clusterName }})": "Configuración del cluster ({{ clusterName }})", "Cluster Settings": "Configuración del cluster", + "The current name of cluster. You can define custom modified name.": "", + "Change name": "", + "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Default namespace": "Espacio de nombre por defecto", "The default namespace for e.g. when applying resources (when not specified directly).": "El espacio de nombre por defecto para, por ejemplo, cuando se aplican recursos (cuando no especificado directamente).", "Allowed namespaces": "Espacios de nombre permitidos", "The list of namespaces you are allowed to access in this cluster.": "La lista de espacios de nombre a los que tiene permiso para acceder en este cluster.", - "Current name": "", - "The current name of cluster. You can define custom modified name.": "", - "Change name": "", - "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Remove Cluster": "Eliminar cluster", "Server": "Servidor", "light theme": "tema claro", @@ -149,9 +148,8 @@ "All namespaces": "Todos los esp. de nombre", "From": "De", "Age": "Edad", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_plural": "", "Release Notes ({{ appVersion }})": "Notas de lanzamiento ({{ appVersion }})", "Fetching release information…": "Obteniendo información de la versión…", "Skip": "Saltar", @@ -396,5 +394,8 @@ "\"{{metricName}}\" on pods": "\"{{metricName}}\" en pods", "resource {{resourceName}} on pods": "recurso {{resourceName}} en pods", "resource {{resourceName}} of container {{containerName}} on pods": "recurso {{resourceName}} del contenedor {{containerName}} en pods", - "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Advertencia. Plugins incompatibles deshabilitados: ({{ pluginList }})" + "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Advertencia. Plugins incompatibles deshabilitados: ({{ pluginList }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "" } diff --git a/frontend/src/i18n/locales/es/translation_old.json b/frontend/src/i18n/locales/es/translation_old.json index a70d69de88..77228b015d 100644 --- a/frontend/src/i18n/locales/es/translation_old.json +++ b/frontend/src/i18n/locales/es/translation_old.json @@ -1,3 +1,4 @@ { - "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "" + "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "", + "Current name": "" } diff --git a/frontend/src/i18n/locales/fr/translation.json b/frontend/src/i18n/locales/fr/translation.json index d04bbd7fe5..255cc9810b 100644 --- a/frontend/src/i18n/locales/fr/translation.json +++ b/frontend/src/i18n/locales/fr/translation.json @@ -64,14 +64,13 @@ "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.": "", "Cluster Settings ({{ clusterName }})": "Paramètres du cluster ({{ clusterName }})", "Cluster Settings": "Paramètres du cluster", + "The current name of cluster. You can define custom modified name.": "", + "Change name": "", + "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Default namespace": "Espace de noms par défaut", "The default namespace for e.g. when applying resources (when not specified directly).": "L'espace de noms par défaut, par exemple lors de l'application de ressources (lorsqu'il n'est pas spécifié directement).", "Allowed namespaces": "Espaces de noms autorisés", "The list of namespaces you are allowed to access in this cluster.": "La liste des espaces de noms que vous pouvez accéder dans ce cluster.", - "Current name": "", - "The current name of cluster. You can define custom modified name.": "", - "Change name": "", - "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Remove Cluster": "Supprimer le cluster", "Server": "Serveur", "light theme": "thème clair", @@ -149,9 +148,8 @@ "All namespaces": "Tous les espaces de noms", "From": "De", "Age": "Âge", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_plural": "", "Release Notes ({{ appVersion }})": "Notes de version ({{ appVersion }})", "Fetching release information…": "Récupération des informations de version…", "Skip": "Passer", @@ -396,5 +394,8 @@ "\"{{metricName}}\" on pods": "\"{{metricName}}\" sur les pods", "resource {{resourceName}} on pods": "ressource {{resourceName}} sur les pods", "resource {{resourceName}} of container {{containerName}} on pods": "ressource {{resourceName}} du conteneur {{containerName}} sur les pods", - "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Attention. Plugins incompatibles désactivés : ({{ pluginList }})" + "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Attention. Plugins incompatibles désactivés : ({{ pluginList }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "" } diff --git a/frontend/src/i18n/locales/fr/translation_old.json b/frontend/src/i18n/locales/fr/translation_old.json index a70d69de88..77228b015d 100644 --- a/frontend/src/i18n/locales/fr/translation_old.json +++ b/frontend/src/i18n/locales/fr/translation_old.json @@ -1,3 +1,4 @@ { - "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "" + "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "", + "Current name": "" } diff --git a/frontend/src/i18n/locales/pt/translation.json b/frontend/src/i18n/locales/pt/translation.json index 45fe21e5cd..27558bfdf2 100644 --- a/frontend/src/i18n/locales/pt/translation.json +++ b/frontend/src/i18n/locales/pt/translation.json @@ -64,14 +64,13 @@ "Cluster name must contain only lowercase alphanumeric characters or '-', and must start and end with an alphanumeric character.": "", "Cluster Settings ({{ clusterName }})": "Definições do cluster ({{ clusterName }})", "Cluster Settings": "Definições do cluster", + "The current name of cluster. You can define custom modified name.": "", + "Change name": "", + "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Default namespace": "Namespace padrão", "The default namespace for e.g. when applying resources (when not specified directly).": "O namespace por defeito, por exemplo, quando se aplicam recursos (quando não especificado directamente).", "Allowed namespaces": "Namespaces permitidos", "The list of namespaces you are allowed to access in this cluster.": "A lista de namespaces que tem permissão para aceder neste cluster.", - "Current name": "", - "The current name of cluster. You can define custom modified name.": "", - "Change name": "", - "Are you sure you want to change the name for \"{{ clusterName }}\"?": "", "Remove Cluster": "Remover Cluster", "Server": "Servidor", "light theme": "tema claro", @@ -149,9 +148,8 @@ "All namespaces": "Todos os \"namespaces\"", "From": "De", "Age": "Idade", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", - "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_plural": "", "Release Notes ({{ appVersion }})": "Notas de lançamento ({{ appVersion }})", "Fetching release information…": "A obter informação da versão…", "Skip": "Saltar", @@ -396,5 +394,8 @@ "\"{{metricName}}\" on pods": "\"{{metricName}}\" em pods", "resource {{resourceName}} on pods": "resource {{resourceName}} em pods", "resource {{resourceName}} of container {{containerName}} on pods": "resource {{resourceName}} do container {{containerName}} em pods", - "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Aviso. Plugins incompatíveis desactivados: ({{ pluginList }})" + "Warning. Incompatible plugins disabled: ({{ pluginList }})": "Aviso. Plugins incompatíveis desactivados: ({{ pluginList }})", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_one": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_many": "", + "{{ eventDate }} ({{ count }} times since {{ firstEventDate }})_other": "" } diff --git a/frontend/src/i18n/locales/pt/translation_old.json b/frontend/src/i18n/locales/pt/translation_old.json index a70d69de88..77228b015d 100644 --- a/frontend/src/i18n/locales/pt/translation_old.json +++ b/frontend/src/i18n/locales/pt/translation_old.json @@ -1,3 +1,4 @@ { - "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "" + "This will add an extension field in your kubeconfig file for \"{{ clusterName }}. Are you sure\"?": "", + "Current name": "" }