From c93d22ec279f05a9e16f3c2b2f2cffca574503f3 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 8 Nov 2021 20:46:45 +0800 Subject: [PATCH] fix(client): i18n.t in schema --- README.md | 4 ++-- packages/client/src/components/admin-layout/More.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3593b7eb38..5196fd966f 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,8 @@ Installation #### Quickstart ~~~shell +yarn create nocobase-app my-nocobase-app --quickstart --lang=en-US # `--lang=en-US` Language settings support `--lang=en-US` and `--lang=zh-CN` -yarn create nocobase-app my-nocobase-app --quickstart --lang=en-US # or zh-CN ~~~ #### Step by step @@ -82,9 +82,9 @@ yarn create nocobase-app my-nocobase-app cd my-nocobase-app # 3. create initialization data +yarn nocobase init --import-demo --lang=en-US # `--import-demo` Importing demo data # `--lang=en-US` Language settings support `--lang=en-US` and `--lang=zh-CN` -yarn nocobase init --import-demo --lang=en-US # 4. start project yarn start diff --git a/packages/client/src/components/admin-layout/More.tsx b/packages/client/src/components/admin-layout/More.tsx index a004a9ece4..9629b57620 100644 --- a/packages/client/src/components/admin-layout/More.tsx +++ b/packages/client/src/components/admin-layout/More.tsx @@ -50,7 +50,7 @@ const schema: ISchema = { properties: { item1: { type: 'void', - title: i18n.t('System settings'), + title: "{{t('System settings')}}", 'x-component': 'Menu.Action', 'x-component-props': { icon: 'SettingOutlined', @@ -58,7 +58,7 @@ const schema: ISchema = { properties: { drawer1: { type: 'void', - title: i18n.t('System settings'), + title: "{{t('System settings')}}", 'x-decorator': 'Form', 'x-decorator-props': { useResource, @@ -70,13 +70,13 @@ const schema: ISchema = { properties: { title: { type: 'string', - title: i18n.t('System title'), + title: "{{t('System title')}}", 'x-decorator': 'FormItem', 'x-component': 'Input', }, logo: { type: 'string', - title: i18n.t('Logo'), + title: "{{t('Logo')}}", 'x-decorator': 'FormItem', 'x-component': 'Upload.Attachment', 'x-component-props': {