From 120a2b5497387a54dbce075192b996c3ebc2df7e Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 15 Nov 2023 14:45:03 +0100 Subject: [PATCH 1/5] translation. display the task frequency in the table --- ui/public/i18n/en/translation.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index 0989547..bc36ca8 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -46,6 +46,7 @@ "col_remotehostname": "IMAP server", "col_task_status": "Task status", "col_task_id": "Task ID", + "col_task_cron": "Task frequency", "create": "Create", "edit": "Edit", "start": "Start", From 9bd4b0c1e1de581c827202ec86d6a6b402d04a6f Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 15 Nov 2023 15:00:59 +0100 Subject: [PATCH 2/5] UI. display the task frequency in the table --- ui/src/views/Tasks.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ui/src/views/Tasks.vue b/ui/src/views/Tasks.vue index f691374..248ed89 100644 --- a/ui/src/views/Tasks.vue +++ b/ui/src/views/Tasks.vue @@ -136,6 +136,15 @@ {{ row.remotehostname }} + + {{ + row.cron === "" + ? $t("tasks.no_cron") + : row.cron === "1h" + ? parseInt(row.cron) + " " + $t("tasks.hour") + : parseInt(row.cron) + " " + $t("tasks.minutes") + }} + {{ row.service ? $t("tasks.running") : $t("tasks.stopped") @@ -270,6 +279,7 @@ export default { "localuser", "remoteusername", "remotehostname", + "task_cron", "task_status", "task_id", ], From 687d0f2855062d054ce86dec55c113e7b4a1b4d9 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Wed, 15 Nov 2023 15:08:00 +0100 Subject: [PATCH 3/5] Migration. add 10m option to be compatible with getmail --- imageroot/actions/create-task/validate-input.json | 1 + ui/src/components/CreateOrEditTask.vue | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/imageroot/actions/create-task/validate-input.json b/imageroot/actions/create-task/validate-input.json index 20626c4..42d0646 100644 --- a/imageroot/actions/create-task/validate-input.json +++ b/imageroot/actions/create-task/validate-input.json @@ -53,6 +53,7 @@ "enum": [ "", "5m", + "10m", "15m", "30m", "45m", diff --git a/ui/src/components/CreateOrEditTask.vue b/ui/src/components/CreateOrEditTask.vue index 8f8d7d9..83dbcc0 100644 --- a/ui/src/components/CreateOrEditTask.vue +++ b/ui/src/components/CreateOrEditTask.vue @@ -186,6 +186,10 @@ >{{ $t("tasks.every") }} 5 {{ $t("tasks.minutes") }} + {{ $t("tasks.every") }} 10 + {{ $t("tasks.minutes") }} {{ $t("tasks.every") }} 15 {{ $t("tasks.minutes") }} Date: Thu, 16 Nov 2023 10:54:16 +0100 Subject: [PATCH 4/5] Translation typo fix --- ui/public/i18n/en/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index bc36ca8..8d45d96 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -83,7 +83,7 @@ "choose_the_user_to_sync": "Choose a user managed by your email server to synchronize the remote messages", "hour":"hour", "minutes":"minutes", - "no_cron": "No Scheduled", + "no_cron": "Not scheduled", "select_your_cron": "select your task frequency", "set_when_you_want_the_task_start": "Select when to start your task", "remove_mails":"Messages removal", From 4d370b1d1496921f0ce018b6ad170f98b166dc43 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Thu, 16 Nov 2023 11:10:18 +0100 Subject: [PATCH 5/5] Translate every_minutes with dynamic property --- ui/public/i18n/en/translation.json | 2 +- ui/src/components/CreateOrEditTask.vue | 41 +++++++++++--------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/ui/public/i18n/en/translation.json b/ui/public/i18n/en/translation.json index 8d45d96..5f3500e 100644 --- a/ui/public/i18n/en/translation.json +++ b/ui/public/i18n/en/translation.json @@ -110,7 +110,7 @@ "something_wrong_cannot_list_informations": "Something went wront we cannot list the remote and account informations", "informations": "Informations", "fetching_statistic_please_wait":"Waiting to retrieve statictics, please wait", - "every":"every", + "every_minutes":"Every {num} minutes", "configure_imapsync": "Go to the settings" }, diff --git a/ui/src/components/CreateOrEditTask.vue b/ui/src/components/CreateOrEditTask.vue index 83dbcc0..3f4864d 100644 --- a/ui/src/components/CreateOrEditTask.vue +++ b/ui/src/components/CreateOrEditTask.vue @@ -182,29 +182,24 @@ {{ $t("tasks.no_cron") }} - {{ $t("tasks.every") }} 5 - {{ $t("tasks.minutes") }} - {{ $t("tasks.every") }} 10 - {{ $t("tasks.minutes") }} - {{ $t("tasks.every") }} 15 - {{ $t("tasks.minutes") }} - {{ $t("tasks.every") }} 30 - {{ $t("tasks.minutes") }} - {{ $t("tasks.every") }} 45 - {{ $t("tasks.minutes") }} - {{ $t("tasks.every") }} 1 {{ $t("tasks.hour") }} + {{ + $t("tasks.every_minutes", { num: 5 }) + }} + {{ + $t("tasks.every_minutes", { num: 10 }) + }} + {{ + $t("tasks.every_minutes", { num: 15 }) + }} + {{ + $t("tasks.every_minutes", { num: 30 }) + }} + {{ + $t("tasks.every_minutes", { num: 45 }) + }} + {{ + $t("tasks.every_minutes", { num: 60 }) + }}