mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 05:01:50 +08:00
refactor(schedules): clarify schedule status labels and add status filter tooltips
- Replace opaque window jargon with plain Chinese/English status and history labels (执行中/待首次执行/非执行时段). - Rename calendar filter heading to 按状态筛选 / Filter by status and add hover tooltips explaining each schedule status. - Update i18n unit test assertions for the updated status labels.
This commit is contained in:
1 parent
9870859698
commit
0d753338f1
3 files changed
+35
-10
No files matched your search
@@ -1871,6 +1871,7 @@ export function ScheduleCalendarWorkspace({
|
||||
return (
|
||||
<label
|
||||
key={st}
|
||||
title={translate(`schedule.statusHint.${st}`)}
|
||||
className="flex cursor-pointer items-center justify-between gap-2 rounded-md px-1.5 py-1 text-xs hover:bg-accent/60"
|
||||
>
|
||||
<span className="flex items-center gap-2">
|
||||
|
||||
@@ -270,13 +270,13 @@ test("schedule windows, counts and stored system messages follow the selected la
|
||||
const zh = scheduleDisplay(i18n.getFixedT("zh-CN"), "zh-CN");
|
||||
assert.match(zh.periodLabel(weekly), /周一.*周六/);
|
||||
assert.equal(zh.endLabel(weekly), "06:00(次日)");
|
||||
assert.equal(zh.statusText(weekly), "窗口运行中");
|
||||
assert.equal(zh.statusText(weekly), "执行中");
|
||||
await i18n.changeLanguage("en");
|
||||
const en = scheduleDisplay(i18n.getFixedT("en"), "en");
|
||||
assert.match(en.periodLabel(weekly), /Weekly.*Mon.*Sat/);
|
||||
assert.equal(en.endLabel(weekly), "06:00 (next day)");
|
||||
assert.equal(en.windowLabel({ ...weekly, end_time: "" }), "Runs continuously from 18:00");
|
||||
assert.equal(en.statusText(weekly), "Window active");
|
||||
assert.equal(en.statusText(weekly), "Active");
|
||||
assert.equal(en.historyActionText("resume"), "Task resumed");
|
||||
assert.equal(en.historyActionText("future-action"), "Status changed");
|
||||
assert.equal(en.timezoneLabel(weekly), "Beijing time (UTC+8)");
|
||||
|
||||
@@ -133,16 +133,40 @@ export const scheduleMessages = {
|
||||
"schedule.weekday.5": ["周五", "Fri"],
|
||||
"schedule.weekday.6": ["周六", "Sat"],
|
||||
"schedule.weekday.7": ["周日", "Sun"],
|
||||
"schedule.status.waiting": ["等待窗口", "Waiting for window"],
|
||||
"schedule.status.running": ["窗口运行中", "Window active"],
|
||||
"schedule.status.outside": ["窗口外", "Outside window"],
|
||||
"schedule.status.waiting": ["待首次执行", "Pending"],
|
||||
"schedule.status.running": ["执行中", "Active"],
|
||||
"schedule.status.outside": ["非执行时段", "Off-hours"],
|
||||
"schedule.status.completed": ["已完成", "Completed"],
|
||||
"schedule.status.error": ["错误", "Error"],
|
||||
"schedule.status.paused": ["已暂停", "Paused"],
|
||||
"schedule.history.running": ["窗口开始", "Window started"],
|
||||
"schedule.history.outside": ["窗口结束", "Window ended"],
|
||||
"schedule.statusHint.running": [
|
||||
"当前处于设定的执行时段内,关联任务正在运行",
|
||||
"Currently inside the scheduled time range; linked tasks are running",
|
||||
],
|
||||
"schedule.statusHint.waiting": [
|
||||
"计划已开启,尚未到第一次执行时间",
|
||||
"Enabled and waiting for its first scheduled run",
|
||||
],
|
||||
"schedule.statusHint.outside": [
|
||||
"此前已执行过,当前不在执行时段内,等下次到点自动继续",
|
||||
"Previously ran; currently outside the scheduled hours and waiting for the next run",
|
||||
],
|
||||
"schedule.statusHint.paused": [
|
||||
"计划已手动关闭,到点不会自动执行",
|
||||
"Manually disabled; will not run automatically",
|
||||
],
|
||||
"schedule.statusHint.completed": [
|
||||
"一次性计划已过结束时间,不会再重复执行",
|
||||
"One-time schedule has finished and will not repeat",
|
||||
],
|
||||
"schedule.statusHint.error": [
|
||||
"到点自动启动或暂停关联任务时发生错误",
|
||||
"Failed to start or pause a linked task automatically",
|
||||
],
|
||||
"schedule.history.running": ["进入执行时段", "Schedule active"],
|
||||
"schedule.history.outside": ["退出执行时段", "Schedule ended"],
|
||||
"schedule.history.completed": ["计划完成", "Schedule completed"],
|
||||
"schedule.history.waiting": ["等待窗口", "Waiting for window"],
|
||||
"schedule.history.waiting": ["待首次执行", "Pending first run"],
|
||||
"schedule.history.paused": ["计划暂停", "Schedule paused"],
|
||||
"schedule.history.resume": ["恢复任务", "Task resumed"],
|
||||
"schedule.history.pause": ["暂停任务", "Task paused"],
|
||||
@@ -219,7 +243,7 @@ export const scheduleMessages = {
|
||||
"schedule.calendar.view.list": ["列表", "Agenda"],
|
||||
"schedule.calendar.view.year": ["年", "Year"],
|
||||
"schedule.calendar.allDay": ["全天 / 持续", "All day"],
|
||||
"schedule.calendar.filters": ["计划状态", "Calendars"],
|
||||
"schedule.calendar.filters": ["按状态筛选", "Filter by status"],
|
||||
"schedule.calendar.upNext": ["即将执行", "Up next"],
|
||||
"schedule.calendar.noUpcoming": ["暂无待触发计划", "No upcoming schedules"],
|
||||
"schedule.calendar.clockMode": ["日历时间基准", "Calendar clock"],
|
||||
@@ -238,7 +262,7 @@ export const scheduleMessages = {
|
||||
"schedule.calendar.inHours": ["{{count}} 小时后", "in {{count}}h"],
|
||||
"schedule.calendar.inDays": ["{{count}} 天后", "in {{count}}d"],
|
||||
"schedule.calendar.nowRunning": ["进行中", "Now"],
|
||||
"schedule.calendar.dragUpdated": ["已更新计划时间窗", "Schedule window updated"],
|
||||
"schedule.calendar.dragUpdated": ["已更新计划时间", "Schedule time updated"],
|
||||
"schedule.calendar.dragHint": ["拖动调整时段 · 拖底边改时长", "Drag to move · drag bottom edge to resize"],
|
||||
"schedule.calendar.durationHours": ["{{hours}}小时", "{{hours}}h"],
|
||||
"schedule.calendar.durationHoursMinutes": ["{{hours}}小时{{minutes}}分", "{{hours}}h {{minutes}}m"],
|
||||
|
||||
Reference in new issue
Block a user