From 3b91f37975a8e2136e24b3f99ea80bd24a1154ad Mon Sep 17 00:00:00 2001 From: xilesun <2013xile@gmail.com> Date: Wed, 23 Oct 2024 00:20:59 +0800 Subject: [PATCH] fix(l10n): build issue --- .../plugin-action-import/src/server/index.ts | 5 ----- .../plugin-action-import/src/server/locale/index.ts | 11 ----------- .../plugin-api-keys/src/server/locale/index.ts | 11 ----------- .../plugin-auth-sms/src/server/locale/index.ts | 12 ------------ .../@nocobase/plugin-auth/src/server/locale/index.ts | 12 ------------ .../plugin-users/src/server/locale/index.ts | 12 ------------ .../plugin-verification/src/server/Plugin.ts | 3 --- .../plugin-verification/src/server/locale/index.ts | 10 ---------- 8 files changed, 76 deletions(-) delete mode 100644 packages/plugins/@nocobase/plugin-action-import/src/server/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-auth-sms/src/server/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts delete mode 100644 packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts diff --git a/packages/plugins/@nocobase/plugin-action-import/src/server/index.ts b/packages/plugins/@nocobase/plugin-action-import/src/server/index.ts index 27425c425..9613e9e6f 100644 --- a/packages/plugins/@nocobase/plugin-action-import/src/server/index.ts +++ b/packages/plugins/@nocobase/plugin-action-import/src/server/index.ts @@ -8,16 +8,11 @@ */ import { Plugin } from '@nocobase/server'; -import { namespace } from '..'; import { downloadXlsxTemplate, importXlsx } from './actions'; -import { enUS, zhCN } from './locale'; import { importMiddleware } from './middleware'; export class PluginActionImportServer extends Plugin { beforeLoad() { - this.app.i18n.addResources('zh-CN', namespace, zhCN); - this.app.i18n.addResources('en-US', namespace, enUS); - this.app.on('afterInstall', async () => { if (!this.app.db.getRepository('roles')) { return; diff --git a/packages/plugins/@nocobase/plugin-action-import/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-action-import/src/server/locale/index.ts deleted file mode 100644 index 892a9b639..000000000 --- a/packages/plugins/@nocobase/plugin-action-import/src/server/locale/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as enUS } from './en-US'; -export { default as zhCN } from './zh-CN'; diff --git a/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts deleted file mode 100644 index 892a9b639..000000000 --- a/packages/plugins/@nocobase/plugin-api-keys/src/server/locale/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as enUS } from './en-US'; -export { default as zhCN } from './zh-CN'; diff --git a/packages/plugins/@nocobase/plugin-auth-sms/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-auth-sms/src/server/locale/index.ts deleted file mode 100644 index 29e1be6c8..000000000 --- a/packages/plugins/@nocobase/plugin-auth-sms/src/server/locale/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as enUS } from './en-US'; -export { default as zhCN } from './zh-CN'; -export { default as ptBR } from './pt-BR'; diff --git a/packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts deleted file mode 100644 index 29e1be6c8..000000000 --- a/packages/plugins/@nocobase/plugin-auth/src/server/locale/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as enUS } from './en-US'; -export { default as zhCN } from './zh-CN'; -export { default as ptBR } from './pt-BR'; diff --git a/packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts deleted file mode 100644 index 29e1be6c8..000000000 --- a/packages/plugins/@nocobase/plugin-users/src/server/locale/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as enUS } from './en-US'; -export { default as zhCN } from './zh-CN'; -export { default as ptBR } from './pt-BR'; diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts index 6589949a5..dd9a18a94 100644 --- a/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts +++ b/packages/plugins/@nocobase/plugin-verification/src/server/Plugin.ts @@ -18,7 +18,6 @@ import { Registry } from '@nocobase/utils'; import { Provider, namespace } from '.'; import initActions from './actions'; import { CODE_STATUS_UNUSED, CODE_STATUS_USED, PROVIDER_TYPE_SMS_ALIYUN } from './constants'; -import { zhCN } from './locale'; import initProviders from './providers'; export interface Interceptor { @@ -134,8 +133,6 @@ export default class PluginVerficationServer extends Plugin { async load() { const { app, db, options } = this; - app.i18n.addResources('zh-CN', namespace, zhCN); - await this.importCollections(path.resolve(__dirname, 'collections')); await initProviders(this); diff --git a/packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts b/packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts deleted file mode 100644 index a5186b9a2..000000000 --- a/packages/plugins/@nocobase/plugin-verification/src/server/locale/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This file is part of the NocoBase (R) project. - * Copyright (c) 2020-2024 NocoBase Co., Ltd. - * Authors: NocoBase Team. - * - * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License. - * For more information, please refer to: https://www.nocobase.com/agreement. - */ - -export { default as zhCN } from './zh-CN';