fix(i18n): use English runtime text and localize system UI

This commit is contained in:
Arthur Koba
2026-10-25 19:44:15 +03:00
parent ada0550571
commit 65a96670d5
289 changed files with 8092 additions and 3426 deletions
+19 -3
View File
@@ -1,3 +1,4 @@
import { runtimeText } from '@/i18n/runtime';
/**
* task-param-utils.ts
*
@@ -46,7 +47,12 @@ function coerceParamValue(
}
const num = Number(trimmed);
if (Number.isNaN(num)) {
return { error: `「${param.label}」必须是有效的数字`, ok: false };
return {
error: runtimeText('value0_must_be_a_valid_number_1d79f887', {
value0: param.label,
}),
ok: false,
};
}
return { value: num, ok: true };
}
@@ -61,7 +67,12 @@ function coerceParamValue(
} else if (val === 'false') {
return { value: false, ok: true };
}
return { error: `「${param.label}」必须是 true 或 false`, ok: false };
return {
error: runtimeText('value0_must_be_true_or_false_23cce68e', {
value0: param.label,
}),
ok: false,
};
}
case 'string':
case 'text':
@@ -96,7 +107,12 @@ export function buildTaskPayload(
// 必填项空值检查
if (param.required && raw.trim() === '') {
return { payload: null, error: `「${param.label}」不能为空` };
return {
payload: null,
error: runtimeText('value0_must_not_be_empty_8bf3a929', {
value0: param.label,
}),
};
}
const result = coerceParamValue(param, raw);