From 7cd9ac5f2c36d746eec4833f202805c04b6f867b Mon Sep 17 00:00:00 2001 From: qkiroc Date: Thu, 25 Aug 2022 11:27:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4i18n=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I71f51f1cd0878a4cbc3198fd4b0b810388b559e6 --- packages/amis-editor/i18nConfig.js | 10 +++++----- packages/amis-editor/src/index.tsx | 2 +- packages/amis-editor/src/{local => locale}/en-US.ts | 0 packages/amis-editor/src/{local => locale}/index.ts | 0 packages/amis-editor/src/{local => locale}/zh-CN.ts | 0 5 files changed, 6 insertions(+), 6 deletions(-) rename packages/amis-editor/src/{local => locale}/en-US.ts (100%) rename packages/amis-editor/src/{local => locale}/index.ts (100%) rename packages/amis-editor/src/{local => locale}/zh-CN.ts (100%) diff --git a/packages/amis-editor/i18nConfig.js b/packages/amis-editor/i18nConfig.js index c1bce6937..782269173 100644 --- a/packages/amis-editor/i18nConfig.js +++ b/packages/amis-editor/i18nConfig.js @@ -6,25 +6,25 @@ module.exports = { test: /.*(ts|tsx|js|jsx)$/ }, ignore: { - list: ['src/icons', 'src/local'] + list: ['src/icons', 'src/locale'] }, importInfo: { source: 'i18n-runtime', imported: 'i18n', local: '_i18n' }, - i18nModule: 'amis-core', + i18nModule: 'i18n-runtime', languages: [ { name: 'en-US', - path: './src/local' + path: './src/locale' }, { name: 'zh-CN', - path: './src/local' + path: './src/locale' } ], - init: { + output: { fileName: 'editor-i18n', fileExtension: 'xlsx', path: './' diff --git a/packages/amis-editor/src/index.tsx b/packages/amis-editor/src/index.tsx index d05dd5582..82fde2529 100644 --- a/packages/amis-editor/src/index.tsx +++ b/packages/amis-editor/src/index.tsx @@ -1,5 +1,5 @@ import 'amis'; -import './local/index'; +import './locale/index'; export * from 'amis-editor-core'; import './tpl/index'; diff --git a/packages/amis-editor/src/local/en-US.ts b/packages/amis-editor/src/locale/en-US.ts similarity index 100% rename from packages/amis-editor/src/local/en-US.ts rename to packages/amis-editor/src/locale/en-US.ts diff --git a/packages/amis-editor/src/local/index.ts b/packages/amis-editor/src/locale/index.ts similarity index 100% rename from packages/amis-editor/src/local/index.ts rename to packages/amis-editor/src/locale/index.ts diff --git a/packages/amis-editor/src/local/zh-CN.ts b/packages/amis-editor/src/locale/zh-CN.ts similarity index 100% rename from packages/amis-editor/src/local/zh-CN.ts rename to packages/amis-editor/src/locale/zh-CN.ts