mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-07-01 18:52:20 +08:00
fix(l10n): build issue
This commit is contained in:
parent
d7c8db97c8
commit
3b91f37975
@ -8,16 +8,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Plugin } from '@nocobase/server';
|
import { Plugin } from '@nocobase/server';
|
||||||
import { namespace } from '..';
|
|
||||||
import { downloadXlsxTemplate, importXlsx } from './actions';
|
import { downloadXlsxTemplate, importXlsx } from './actions';
|
||||||
import { enUS, zhCN } from './locale';
|
|
||||||
import { importMiddleware } from './middleware';
|
import { importMiddleware } from './middleware';
|
||||||
|
|
||||||
export class PluginActionImportServer extends Plugin {
|
export class PluginActionImportServer extends Plugin {
|
||||||
beforeLoad() {
|
beforeLoad() {
|
||||||
this.app.i18n.addResources('zh-CN', namespace, zhCN);
|
|
||||||
this.app.i18n.addResources('en-US', namespace, enUS);
|
|
||||||
|
|
||||||
this.app.on('afterInstall', async () => {
|
this.app.on('afterInstall', async () => {
|
||||||
if (!this.app.db.getRepository('roles')) {
|
if (!this.app.db.getRepository('roles')) {
|
||||||
return;
|
return;
|
||||||
|
@ -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';
|
|
@ -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';
|
|
@ -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';
|
|
@ -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';
|
|
@ -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';
|
|
@ -18,7 +18,6 @@ import { Registry } from '@nocobase/utils';
|
|||||||
import { Provider, namespace } from '.';
|
import { Provider, namespace } from '.';
|
||||||
import initActions from './actions';
|
import initActions from './actions';
|
||||||
import { CODE_STATUS_UNUSED, CODE_STATUS_USED, PROVIDER_TYPE_SMS_ALIYUN } from './constants';
|
import { CODE_STATUS_UNUSED, CODE_STATUS_USED, PROVIDER_TYPE_SMS_ALIYUN } from './constants';
|
||||||
import { zhCN } from './locale';
|
|
||||||
import initProviders from './providers';
|
import initProviders from './providers';
|
||||||
|
|
||||||
export interface Interceptor {
|
export interface Interceptor {
|
||||||
@ -134,8 +133,6 @@ export default class PluginVerficationServer extends Plugin {
|
|||||||
async load() {
|
async load() {
|
||||||
const { app, db, options } = this;
|
const { app, db, options } = this;
|
||||||
|
|
||||||
app.i18n.addResources('zh-CN', namespace, zhCN);
|
|
||||||
|
|
||||||
await this.importCollections(path.resolve(__dirname, 'collections'));
|
await this.importCollections(path.resolve(__dirname, 'collections'));
|
||||||
|
|
||||||
await initProviders(this);
|
await initProviders(this);
|
||||||
|
@ -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';
|
|
Loading…
x
Reference in New Issue
Block a user