From c08a8a3557a1b0358ebc9fad3cba26ba26fb4edf Mon Sep 17 00:00:00 2001 From: sealday Date: Wed, 8 May 2024 19:30:55 +0800 Subject: [PATCH] fix: translation in mobile (#929) Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/929 --- .../plugin-mobile-client/src/client/locale/index.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts b/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts index b73516481..9212633dd 100644 --- a/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts +++ b/packages/plugins/@tachybase/plugin-mobile-client/src/client/locale/index.ts @@ -3,9 +3,6 @@ import { useTranslation as useT } from 'react-i18next'; export const NAMESPACE = 'mobile-client'; -// i18n.addResources('zh-CN', NAMESPACE, zhCN); -// i18n.addResources('en-US', NAMESPACE, enUS); - export function lang(key: string) { return i18n.t(key, { ns: NAMESPACE }); } @@ -17,7 +14,7 @@ export function generateNTemplate(key: string) { export const tval = (key: string) => nTval(key, { ns: NAMESPACE }); export function useTranslation() { - return useT([NAMESPACE, 'client'], { + return useT([NAMESPACE, '@tachybase/plugin-mobile-client', 'client'], { nsMode: 'fallback', }); }