feat(i18n): add scheduled tasks (cron) translations for en, zh, ja

Add comprehensive i18n messages for the new scheduled tasks (cron) feature.
Includes UI labels, actions, stats, validation, and example tasks for English,
Simplified Chinese, and Japanese locales.
This commit is contained in:
DEV_DSW
2026-04-20 16:00:52 +08:00
parent 7dc37b26b0
commit 44dfe51eaf
2 changed files with 801 additions and 205 deletions

View File

@@ -51,6 +51,193 @@ export const messages: I18nMessages = {
scripts: 'Scripts',
settings: 'Settings',
},
cron: {
title: 'Scheduled tasks',
subtitle: 'Automate AI workflows with scheduled tasks',
actions: {
refresh: 'Refresh',
newTask: 'New task',
createTask: 'Create task',
runNow: 'Run now',
delete: 'Delete',
},
stats: {
total: 'All',
active: 'Active',
paused: 'Paused',
failed: 'Recent failures',
},
empty: {
title: 'No scheduled tasks',
description: 'Create a task and optionally prefill channel accounts and delivery targets.',
},
loading: 'Loading tasks...',
warnings: {
agentsLoadFailed: 'Failed to load Agents. Tasks will keep showing using the current snapshot. {error}',
channelsLoadFailed: 'Failed to load channel accounts. Delivery info will be shown as placeholders. {error}',
channelsCatalogFailed: 'Failed to load channel accounts. You can keep existing configuration. {error}',
targetsLoadFailed: 'Failed to load target suggestions. You can still enter manually. {error}',
noChannelsAvailable: 'No channel accounts are available. Delivery tasks cannot be created right now.',
},
feedback: {
updated: 'Task updated.',
created: 'Task created.',
enabled: 'Task enabled.',
paused: 'Task paused.',
triggered: 'Task triggered.',
deleted: 'Task deleted.',
},
confirmDelete: 'Delete “{name}”? This cannot be undone.',
common: {
unnamedJob: 'Untitled task',
},
card: {
enabled: 'Enabled',
paused: 'Paused',
modeAnnounce: 'Run & send',
modeNone: 'Run only',
pauseTask: 'Pause task',
enableTask: 'Enable task',
agentLabel: 'Agent',
deliveryLabel: 'Delivery',
lastRun: 'Last run: {time}',
nextRun: 'Next run: {time}',
success: 'Success',
failed: 'Failed',
},
dialog: {
editTitle: 'Edit task',
createTitle: 'Create task',
subtitle: 'Arrange an automated AI task',
nameLabel: 'Task name',
namePlaceholder: 'e.g. Morning briefing',
messageLabel: 'Message / prompt',
messagePlaceholder: 'Describe what the task should do or announce',
scheduleLabel: 'Schedule',
customCronPlaceholder: 'Enter a cron expression, e.g. 0 9 * * *',
nextRun: 'Next run: {time}',
scheduleHint: 'Choose a preset or enter a custom cron expression',
usePreset: 'Use presets',
useCustom: 'Use custom cron',
deliveryTitle: 'Delivery',
deliverySubtitle: 'Keep results in NIANXX, or push the final result to an external channel.',
deliveryOptions: {
noneTitle: 'Keep in NIANXX',
noneDesc: 'The task runs normally and results stay in-app.',
announceTitle: 'Send to external channel',
announceDesc: 'Deliver the final result to a configured messaging channel.',
},
channelLabel: 'Channel',
channelEmpty: 'No channels available',
accountLabel: 'Account',
accountLoading: 'Loading channel accounts…',
accountEmpty: 'No accounts for this channel',
targetLabel: 'Target',
targetPlaceholder: 'e.g. Ops group, room-ops, https://example.com/webhook',
targetsLoading: 'Loading suggested targets for this channel account...',
targetsReady: 'Suggested targets are ready. You can also type a group, user ID, or webhook.',
targetsNone: 'No suggested targets found. You can still type a group, user ID, or webhook.',
preview: 'Preview: {preview}',
currentAccount: 'Current account: {account}',
enableTitle: 'Enable now',
enableDesc: 'Start running this task immediately after creation.',
saving: 'Saving...',
saveEdit: 'Save changes',
create: 'Create task',
},
validation: {
nameRequired: 'Please enter a task name.',
messageRequired: 'Please enter the message/prompt.',
scheduleRequired: 'Please provide a schedule.',
channelRequired: 'Please select a delivery channel.',
targetRequired: 'Please enter a delivery target (group, user ID, or webhook).',
},
delivery: {
none: 'Run only (no delivery)',
pending: 'Delivery pending configuration',
targetPending: 'Target pending',
},
deliveryTarget: {
savedCustom: 'Custom target saved in this job',
},
channels: {
unnamed: 'Unnamed channel',
mainAccount: 'Main account',
douyin: 'Douyin',
feishu: 'Feishu',
fliggy: 'Fliggy',
meituan: 'Meituan',
qqbot: 'QQ Bot',
telegram: 'Telegram',
wechat: 'WeChat',
wecom: 'WeCom',
},
agent: {
main: 'Main Agent',
workspace: 'Workspace {path}',
dir: 'Dir {path}',
sharedMainWorkspace: 'Shared main workspace',
syncPending: 'Workspace pending sync',
},
weekdays: {
sun: 'Sun',
mon: 'Mon',
tue: 'Tue',
wed: 'Wed',
thu: 'Thu',
fri: 'Fri',
sat: 'Sat',
},
time: {
justNow: 'Just now',
secondsAgo: '{count} seconds ago',
minutesAgo: '{count} minutes ago',
hoursAgo: '{count} hours ago',
daysAgo: '{count} days ago',
},
schedule: {
once: 'One-time · {time}',
everySeconds: 'Every {count} seconds',
everyMinutes: 'Every {count} minutes',
everyHours: 'Every {count} hours',
everyDays: 'Every {count} days',
everyMinute: 'Every minute',
everyNMinutes: 'Every {count} minutes',
hourly: 'Hourly',
weekly: 'Every {weekday} {time}',
monthly: 'Every month on day {day} at {time}',
daily: 'Daily {time}',
presets: {
'every-minute': 'Every minute',
'every-5-minutes': 'Every 5 minutes',
'every-15-minutes': 'Every 15 minutes',
'every-hour': 'Hourly',
'daily-9': 'Daily 09:00',
'daily-18': 'Daily 18:00',
'weekly-mon': 'Mon 09:00',
'monthly-first': 'Monthly 1st 09:00',
},
},
fallback: {
jobs: {
morningBriefing: {
name: 'Morning briefing',
message: 'Before opening, remind on-duty staff to check channel status and todays room inventory.',
target: 'Morning ops group',
},
channelCheck: {
name: 'Channel health check',
message: 'Poll Fliggy, Meituan, and Douyin channel status every 15 minutes.',
},
reviewSummary: {
name: 'Reviews summary',
message: 'Generate a review todo list every evening and send it to the operations team.',
target: 'Ops review group',
error: 'Channel request timed out. Evening summary did not complete. Check gateway and service status.',
},
},
},
},
channels: {
modal: {
title: 'Channel configuration',
@@ -326,6 +513,193 @@ export const messages: I18nMessages = {
scripts: '脚本',
settings: '设置',
},
cron: {
title: '定时任务',
subtitle: '通过定时任务自动化 AI 工作流',
actions: {
refresh: '刷新',
newTask: '新建任务',
createTask: '创建任务',
runNow: '立即执行',
delete: '删除',
},
stats: {
total: '全部任务',
active: '启用中',
paused: '已暂停',
failed: '最近失败',
},
empty: {
title: '还没有定时任务',
description: '现在可以创建任务并预留好渠道账号和发送目标。',
},
loading: '正在加载任务...',
warnings: {
agentsLoadFailed: 'Agents 数据加载失败,任务仍会使用当前快照继续展示。{error}',
channelsLoadFailed: '渠道账号加载失败,发送配置将以占位信息展示。{error}',
channelsCatalogFailed: '渠道账号加载失败,仍可保留现有配置。{error}',
targetsLoadFailed: '目标候选加载失败,仍可手工输入。{error}',
noChannelsAvailable: '当前没有可用的渠道账号,暂时无法新建发送型任务。',
},
feedback: {
updated: '定时任务已更新。',
created: '定时任务已创建。',
enabled: '任务已启用。',
paused: '任务已暂停。',
triggered: '任务已触发执行。',
deleted: '任务已删除。',
},
confirmDelete: '确认删除“{name}”吗?删除后将无法恢复。',
common: {
unnamedJob: '未命名任务',
},
card: {
enabled: '启用中',
paused: '已暂停',
modeAnnounce: '执行并发送',
modeNone: '仅执行',
pauseTask: '暂停任务',
enableTask: '启用任务',
agentLabel: 'Agent',
deliveryLabel: '送达',
lastRun: '最近执行:{time}',
nextRun: '下次执行:{time}',
success: '成功',
failed: '失败',
},
dialog: {
editTitle: '编辑任务',
createTitle: '创建任务',
subtitle: '安排自动化的 AI 任务',
nameLabel: '任务名称',
namePlaceholder: '例如:晨间播报',
messageLabel: '消息/提示词',
messagePlaceholder: '描述任务要执行或广播的内容',
scheduleLabel: '调度计划',
customCronPlaceholder: '输入 Cron 表达式,例如 0 9 * * *',
nextRun: '下次执行:{time}',
scheduleHint: '选择预设或填写自定义 Cron 表达式',
usePreset: '使用预设',
useCustom: '使用自定义 Cron',
deliveryTitle: '投递设置',
deliverySubtitle: '选择仅在 NIANXX 内保留结果,或把最终结果推送到外部通道。',
deliveryOptions: {
noneTitle: '仅在NIANXX内',
noneDesc: '任务照常运行,结果只保留在应用内。',
announceTitle: '发送到外部通道',
announceDesc: '将最终结果投递到已配置的消息通道。',
},
channelLabel: '发送渠道',
channelEmpty: '暂无可用渠道',
accountLabel: '账号',
accountLoading: '正在加载渠道账号…',
accountEmpty: '当前渠道没有账号列表',
targetLabel: '目标',
targetPlaceholder: '例如值班群、room-ops、https://example.com/webhook',
targetsLoading: '正在为当前渠道账号加载推荐目标...',
targetsReady: '推荐目标已就绪,也可以继续手工输入群组、用户标识或 Webhook。',
targetsNone: '暂未发现推荐目标,仍可手工输入群组、用户标识或 Webhook。',
preview: '预览:{preview}',
currentAccount: '当前账号:{account}',
enableTitle: '立即启用',
enableDesc: '创建后立即开始运行此任务。',
saving: '保存中...',
saveEdit: '保存修改',
create: '创建任务',
},
validation: {
nameRequired: '请填写任务名称。',
messageRequired: '请填写提醒内容。',
scheduleRequired: '请填写执行计划。',
channelRequired: '请选择一个发送渠道。',
targetRequired: '请填写发送目标,例如群组名、用户标识或 Webhook。',
},
delivery: {
none: '仅执行任务,不额外发送',
pending: '公告发送待配置',
targetPending: '目标待填写',
},
deliveryTarget: {
savedCustom: '当前任务里已经保存的自定义目标',
},
channels: {
unnamed: '未命名渠道',
mainAccount: '主账号',
douyin: '抖音',
feishu: '飞书',
fliggy: '飞猪',
meituan: '美团',
qqbot: 'QQ 机器人',
telegram: 'Telegram',
wechat: '微信',
wecom: '企业微信',
},
agent: {
main: '主 Agent',
workspace: '工作区 {path}',
dir: '目录 {path}',
sharedMainWorkspace: '共享主工作区',
syncPending: '工作区待同步',
},
weekdays: {
sun: '周日',
mon: '周一',
tue: '周二',
wed: '周三',
thu: '周四',
fri: '周五',
sat: '周六',
},
time: {
justNow: '刚刚',
secondsAgo: '{count} 秒前',
minutesAgo: '{count} 分钟前',
hoursAgo: '{count} 小时前',
daysAgo: '{count} 天前',
},
schedule: {
once: '单次执行 · {time}',
everySeconds: '每 {count} 秒',
everyMinutes: '每 {count} 分钟',
everyHours: '每 {count} 小时',
everyDays: '每 {count} 天',
everyMinute: '每分钟',
everyNMinutes: '每 {count} 分钟',
hourly: '每小时整点',
weekly: '每周 {weekday} {time}',
monthly: '每月 {day} 日 {time}',
daily: '每天 {time}',
presets: {
'every-minute': '每分钟',
'every-5-minutes': '每 5 分钟',
'every-15-minutes': '每 15 分钟',
'every-hour': '每小时整点',
'daily-9': '每天 09:00',
'daily-18': '每天 18:00',
'weekly-mon': '每周一 09:00',
'monthly-first': '每月 1 日 09:00',
},
},
fallback: {
jobs: {
morningBriefing: {
name: '晨间营业播报',
message: '每天开店前提醒值班同事检查渠道状态和当日房态。',
target: '早班值守群',
},
channelCheck: {
name: '渠道异常巡检',
message: '每 15 分钟轮询飞猪、美团和抖音渠道在线状态。',
},
reviewSummary: {
name: '评论汇总提醒',
message: '每日晚间生成评论待处理清单并推送给运营。',
target: '运营复盘群',
error: '渠道响应超时,晚间汇总未完成,请检查网关与服务状态。',
},
},
},
},
channels: {
modal: {
title: '渠道配置',
@@ -601,6 +975,193 @@ export const messages: I18nMessages = {
scripts: 'スクリプト',
settings: '設定',
},
cron: {
title: '定時タスク',
subtitle: 'AI 工作流を自動化する定時タスク',
actions: {
refresh: '更新',
newTask: '新規タスク',
createTask: 'タスクを作成',
runNow: '今すぐ実行',
delete: '削除',
},
stats: {
total: '全タスク',
active: '有効',
paused: '停止中',
failed: '直近の失敗',
},
empty: {
title: '定時タスクがありません',
description: 'タスクを作成し、チャンネルアカウントと配信先を事前に設定できます。',
},
loading: 'タスクを読み込み中...',
warnings: {
agentsLoadFailed: 'Agents の読み込みに失敗しました。現在のスナップショットで表示を継続します。{error}',
channelsLoadFailed: 'チャンネルアカウントの読み込みに失敗しました。配信情報はプレースホルダー表示になります。{error}',
channelsCatalogFailed: 'チャンネルアカウントの読み込みに失敗しました。既存の設定は保持できます。{error}',
targetsLoadFailed: '配信先候補の読み込みに失敗しました。手動入力は可能です。{error}',
noChannelsAvailable: '利用可能なチャンネルアカウントがありません。現在は配信型タスクを作成できません。',
},
feedback: {
updated: 'タスクを更新しました。',
created: 'タスクを作成しました。',
enabled: 'タスクを有効にしました。',
paused: 'タスクを停止しました。',
triggered: 'タスクを実行しました。',
deleted: 'タスクを削除しました。',
},
confirmDelete: '「{name}」を削除しますか?この操作は元に戻せません。',
common: {
unnamedJob: '無題のタスク',
},
card: {
enabled: '有効',
paused: '停止',
modeAnnounce: '実行して送信',
modeNone: '実行のみ',
pauseTask: 'タスクを停止',
enableTask: 'タスクを有効化',
agentLabel: 'Agent',
deliveryLabel: '配信',
lastRun: '前回実行:{time}',
nextRun: '次回実行:{time}',
success: '成功',
failed: '失敗',
},
dialog: {
editTitle: 'タスクを編集',
createTitle: 'タスクを作成',
subtitle: '自動化 AI タスクを設定します',
nameLabel: 'タスク名',
namePlaceholder: '例:朝のブリーフィング',
messageLabel: 'メッセージ / プロンプト',
messagePlaceholder: 'タスクが実行・通知する内容を入力します',
scheduleLabel: 'スケジュール',
customCronPlaceholder: 'Cron 式を入力0 9 * * *',
nextRun: '次回実行:{time}',
scheduleHint: 'プリセットを選ぶか、カスタム Cron 式を入力してください',
usePreset: 'プリセットを使用',
useCustom: 'カスタム Cron',
deliveryTitle: '配信設定',
deliverySubtitle: '結果を NIANXX に保持するか、外部チャンネルに送信します。',
deliveryOptions: {
noneTitle: 'NIANXX 内のみ',
noneDesc: 'タスクは通常実行され、結果はアプリ内に保持されます。',
announceTitle: '外部チャンネルへ送信',
announceDesc: '最終結果を設定済みメッセージチャンネルへ配信します。',
},
channelLabel: 'チャンネル',
channelEmpty: '利用可能なチャンネルはありません',
accountLabel: 'アカウント',
accountLoading: 'チャンネルアカウントを読み込み中…',
accountEmpty: 'このチャンネルにはアカウントがありません',
targetLabel: '送信先',
targetPlaceholder: '例運用グループ、room-ops、https://example.com/webhook',
targetsLoading: 'このチャンネルアカウントの候補を読み込み中...',
targetsReady: '候補が利用可能です。グループ名、ユーザー ID、Webhook も手動入力できます。',
targetsNone: '候補が見つかりません。グループ名、ユーザー ID、Webhook を手動入力できます。',
preview: 'プレビュー:{preview}',
currentAccount: '現在のアカウント:{account}',
enableTitle: 'すぐに有効化',
enableDesc: '作成後すぐにこのタスクの実行を開始します。',
saving: '保存中...',
saveEdit: '変更を保存',
create: 'タスクを作成',
},
validation: {
nameRequired: 'タスク名を入力してください。',
messageRequired: 'メッセージ/プロンプトを入力してください。',
scheduleRequired: 'スケジュールを入力してください。',
channelRequired: '配信チャンネルを選択してください。',
targetRequired: '配信先(グループ、ユーザー ID、Webhookを入力してください。',
},
delivery: {
none: '実行のみ(配信なし)',
pending: '配信設定が未完了です',
targetPending: '送信先が未入力です',
},
deliveryTarget: {
savedCustom: 'このタスクに保存されているカスタム送信先',
},
channels: {
unnamed: '名称未設定のチャンネル',
mainAccount: 'メインアカウント',
douyin: 'Douyin',
feishu: 'Feishu',
fliggy: 'Fliggy',
meituan: 'Meituan',
qqbot: 'QQ Bot',
telegram: 'Telegram',
wechat: 'WeChat',
wecom: 'WeCom',
},
agent: {
main: 'メイン Agent',
workspace: 'ワークスペース {path}',
dir: 'ディレクトリ {path}',
sharedMainWorkspace: 'メインワークスペースを共有',
syncPending: 'ワークスペース同期待ち',
},
weekdays: {
sun: '日',
mon: '月',
tue: '火',
wed: '水',
thu: '木',
fri: '金',
sat: '土',
},
time: {
justNow: 'たった今',
secondsAgo: '{count} 秒前',
minutesAgo: '{count} 分前',
hoursAgo: '{count} 時間前',
daysAgo: '{count} 日前',
},
schedule: {
once: '1回のみ · {time}',
everySeconds: '{count} 秒ごと',
everyMinutes: '{count} 分ごと',
everyHours: '{count} 時間ごと',
everyDays: '{count} 日ごと',
everyMinute: '毎分',
everyNMinutes: '{count} 分ごと',
hourly: '毎時',
weekly: '毎週 {weekday} {time}',
monthly: '毎月 {day} 日 {time}',
daily: '毎日 {time}',
presets: {
'every-minute': '毎分',
'every-5-minutes': '5 分ごと',
'every-15-minutes': '15 分ごと',
'every-hour': '毎時',
'daily-9': '毎日 09:00',
'daily-18': '毎日 18:00',
'weekly-mon': '毎週月曜 09:00',
'monthly-first': '毎月 1 日 09:00',
},
},
fallback: {
jobs: {
morningBriefing: {
name: '朝のブリーフィング',
message: '開店前に、当番スタッフへチャンネル状態と本日の在庫確認を通知します。',
target: '朝番グループ',
},
channelCheck: {
name: 'チャンネル監視',
message: 'Fliggy、Meituan、Douyin のオンライン状態を 15 分ごとに確認します。',
},
reviewSummary: {
name: 'レビュー要約',
message: '毎晩、レビュー対応リストを生成して運用へ送信します。',
target: '運用レビューグループ',
error: 'チャンネル応答がタイムアウトしました。夜間要約が完了しませんでした。ゲートウェイとサービス状態を確認してください。',
},
},
},
},
channels: {
modal: {
title: 'チャンネル設定',