i18n(automation): localize RuleEditor and WorkflowEditor form strings

Adds ~40 automation.ruleEditor.* and automation.workflowEditor.* keys
to en.ts + zh.ts (labels, placeholders, error messages, action labels).
RuleFormModal and WorkflowFormModal now route every hardcoded English
string through useT(), including validation errors and modal titles.

Closes remaining Z-B i18n work after the prompt-builder locale
dispatch (cf92e0c), dept-keywords typing (a78bdb9), and sidebar/
formatters/notification/skills i18n landed earlier.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-17 01:13:19 -04:00
1 parent a78bdb9b02
commit 1f310a121e
4 files changed
+115 -29

No files matched your search

+41
View File
@@ -935,4 +935,45 @@ export const en: Record<string, string> = {
"conn.refreshingState": "Refreshing connector state...",
"conn.latestHealthCheck": "Latest health-check detail",
"conn.configDoc": "Configuration doc",
// ── Automation rule editor ──
"automation.ruleEditor.newTitle": "New Automation Rule",
"automation.ruleEditor.editTitle": "Edit Automation Rule",
"automation.ruleEditor.nameLabel": "Rule Name",
"automation.ruleEditor.namePlaceholder": "e.g., Auto-assign blocked tasks",
"automation.ruleEditor.descriptionLabel": "Description",
"automation.ruleEditor.descriptionPlaceholder": "What does this rule do?",
"automation.ruleEditor.triggerLabel": "Trigger",
"automation.ruleEditor.conditionsLabel": "Conditions (JSON)",
"automation.ruleEditor.actionLabel": "Action",
"automation.ruleEditor.actionConfigLabel": "Action Configuration (JSON)",
"automation.ruleEditor.sourceDepartmentLabel": "Source Department",
"automation.ruleEditor.targetDepartmentLabel": "Target Department",
"automation.ruleEditor.priorityLabel": "Priority",
"automation.ruleEditor.priorityLow": "Low priority",
"automation.ruleEditor.priorityHigh": "High priority",
"automation.ruleEditor.cancel": "Cancel",
"automation.ruleEditor.save": "Save Changes",
"automation.ruleEditor.create": "Create Rule",
"automation.ruleEditor.errNameRequired": "Rule name is required",
"automation.ruleEditor.errConditionsJson": "Conditions must be valid JSON",
"automation.ruleEditor.errActionConfigJson": "Action config must be valid JSON",
"automation.ruleEditor.errSaveFailed": "Failed to save rule",
// ── Workflow editor ──
"automation.workflowEditor.newTitle": "New Workflow",
"automation.workflowEditor.editTitle": "Edit Workflow",
"automation.workflowEditor.nameLabel": "Workflow Name",
"automation.workflowEditor.namePlaceholder": "e.g., Production deployment pipeline",
"automation.workflowEditor.descriptionLabel": "Description",
"automation.workflowEditor.descriptionPlaceholder": "Describe this workflow pipeline",
"automation.workflowEditor.triggerLabel": "Trigger (JSON)",
"automation.workflowEditor.stepsLabel": "Steps (JSON array)",
"automation.workflowEditor.cancel": "Cancel",
"automation.workflowEditor.save": "Save Changes",
"automation.workflowEditor.create": "Create Workflow",
"automation.workflowEditor.errNameRequired": "Workflow name is required",
"automation.workflowEditor.errTriggerJson": "Trigger must be valid JSON",
"automation.workflowEditor.errStepsJson": "Steps must be a valid JSON array",
"automation.workflowEditor.errSaveFailed": "Failed to save workflow",
};