From 56a277e47ebe97d28b3d31eb4c9af3e0099ecc2e Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Tue, 11 Oct 2022 11:11:21 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Add=20proper=20translation=20for?= =?UTF-8?q?=20container=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/modules/docker.json | 20 ++++++++++++++++---- src/modules/docker/ContainerActionBar.tsx | 6 +++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/public/locales/en/modules/docker.json b/public/locales/en/modules/docker.json index f54db9bd9..047bdec30 100644 --- a/public/locales/en/modules/docker.json +++ b/public/locales/en/modules/docker.json @@ -47,10 +47,22 @@ "title": "Add to Homarr" } }, - "messages": { - "successfullyExecuted": { - "title": "Container {{containerName}} {{action}}ed", - "message": "Your container was successfully {{action}}ed" + "actions": { + "start": { + "start": "Starting", + "end": "Started" + }, + "stop": { + "start": "Stopping", + "end": "Stopped" + }, + "restart": { + "start": "Restarting", + "end": "Restarted" + }, + "remove": { + "start": "Removing", + "end": "Removed" } }, "errors": { diff --git a/src/modules/docker/ContainerActionBar.tsx b/src/modules/docker/ContainerActionBar.tsx index 125ccd80c..d83b0d272 100644 --- a/src/modules/docker/ContainerActionBar.tsx +++ b/src/modules/docker/ContainerActionBar.tsx @@ -31,7 +31,7 @@ function sendDockerCommand( showNotification({ id: containerId, loading: true, - title: `${action}ing container ${containerName}`, + title: `${t(`actions.${action}.start`)} ${containerName}`, message: undefined, autoClose: false, disallowClose: true, @@ -41,8 +41,8 @@ function sendDockerCommand( .then((res) => { updateNotification({ id: containerId, - title: t('messages.successfullyExecuted.message', { containerName, action }), - message: t('messages.successfullyExecuted.message', { action }), + title: containerName, + message: `${t(`actions.${action}.end`)} ${containerName}`, icon: , autoClose: 2000, });