From 05e62a6f9430c74ce6ed84c8e1341a9c27455789 Mon Sep 17 00:00:00 2001 From: ssongliu <73214554+ssongliu@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:08:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=89=A7=E8=A1=8C=E5=91=A8=E6=9C=9F=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=20(#5412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #5404 --- frontend/src/lang/modules/tw.ts | 10 +++++----- frontend/src/lang/modules/zh.ts | 10 +++++----- frontend/src/views/cronjob/helper.ts | 6 ++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 2f359d861..616d0693c 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -827,12 +827,12 @@ const message = { perMonth: '每月', perWeek: '每周', perHour: '每小時', - perNDay: '每隔 N 日', + perNDay: '每 N 日', perDay: '每天', - perNHour: '每隔 N 時', - perNMinute: '每隔 N 分鐘', - perNSecond: '每隔 N 秒', - per: '每隔', + perNHour: '每 N 時', + perNMinute: '每 N 分鐘', + perNSecond: '每 N 秒', + per: '每', handle: '執行', day: '日', monday: '周一', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 4c1fde1d0..3106b4b95 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -828,12 +828,12 @@ const message = { perMonth: '每月', perWeek: '每周', perHour: '每小时', - perNDay: '每隔 N 日', + perNDay: '每 N 日', perDay: '每天', - perNHour: '每隔 N 时', - perNMinute: '每隔 N 分钟', - perNSecond: '每隔 N 秒', - per: '每隔', + perNHour: '每 N 时', + perNMinute: '每 N 分钟', + perNSecond: '每 N 秒', + per: '每', handle: '执行', day: '日', monday: '周一', diff --git a/frontend/src/views/cronjob/helper.ts b/frontend/src/views/cronjob/helper.ts index 80ceb0b59..e0bb3684b 100644 --- a/frontend/src/views/cronjob/helper.ts +++ b/frontend/src/views/cronjob/helper.ts @@ -92,12 +92,10 @@ export function transObjToSpec(specType: string, week, day, hour, minute, second case 'perWeek': return `${minute} ${hour} * * ${week}`; case 'perNDay': - day = Number(day) + 1 + ''; return `${minute} ${hour} */${day} * *`; case 'perDay': return `${minute} ${hour} * * *`; case 'perNHour': - hour = Number(hour) + 1 + ''; return `${minute} */${hour} * * *`; case 'perHour': return `${minute} * * * *`; @@ -141,13 +139,13 @@ export function transSpecToObj(spec: string) { } if (specs[1].indexOf('*/') !== -1) { specItem.specType = 'perNHour'; - specItem.hour = Number(specs[1].replaceAll('*/', '')) - 1; + specItem.hour = Number(specs[1].replaceAll('*/', '')); return specItem; } specItem.hour = Number(specs[1]); if (specs[2].indexOf('*/') !== -1) { specItem.specType = 'perNDay'; - specItem.day = Number(specs[2].replaceAll('*/', '')) - 1; + specItem.day = Number(specs[2].replaceAll('*/', '')); return specItem; } if (specs[2] !== '*') {