fix: i18n

This commit is contained in:
gchust 2025-06-28 22:29:34 +08:00
parent 6e177e0923
commit 0a1c9df1f2

View File

@ -25,7 +25,7 @@ export function getT(model: FlowModel): (key: string, options?: any) => string {
if (model.flowEngine?.translate) { if (model.flowEngine?.translate) {
return (key: string, options?: any) => { return (key: string, options?: any) => {
// 自动添加 flow-engine 命名空间 // 自动添加 flow-engine 命名空间
return model.flowEngine.translate(key, { ns: FLOW_ENGINE_NAMESPACE, ...options }); return model.flowEngine.translate(key, { ns: [FLOW_ENGINE_NAMESPACE, 'client'], nsMode: 'fallback', ...options });
}; };
} }
// 回退到原始键值 // 回退到原始键值