Merge branch 'main' into next

This commit is contained in:
GitHub Actions Bot 2024-07-30 03:25:39 +00:00
commit f1cbd10ca8

View File

@ -4,9 +4,9 @@ import { useApp } from '@nocobase/client';
export function useT() {
const app = useApp();
return (str: string) => app.i18n.t(str, { ns: pkg.name });
return (str: string) => app.i18n.t(str, { ns: [pkg.name, 'client'] });
}
export function tStr(key: string) {
return `{{t('${key}', { ns: '${pkg.name}', nsMode: 'fallback' })}}`;
return `{{t(${JSON.stringify(key)}, { ns: ['${pkg.name}', 'client'], nsMode: 'fallback' })}}`;
}