diff --git a/example/src/components/RightContent/AvatarDropdown.tsx b/example/src/components/RightContent/AvatarDropdown.tsx index dd8950b5..3f41e911 100644 --- a/example/src/components/RightContent/AvatarDropdown.tsx +++ b/example/src/components/RightContent/AvatarDropdown.tsx @@ -2,7 +2,7 @@ import React, { useCallback } from 'react'; import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons'; import { Avatar, Menu, Spin } from 'antd'; import { ClickParam } from 'antd/es/menu'; -import { history, useModel } from 'umi'; +import { history, useIntl, useModel } from 'umi'; import { getPageQuery } from '@/utils/utils'; import { outLogin } from '@/services/login'; @@ -84,7 +84,7 @@ const AvatarDropdown: React.FC = ({ menu }) => { - 退出登录 + {useIntl().formatMessage({ id: 'menu.account.logout' })} ); diff --git a/example/src/components/RightContent/index.tsx b/example/src/components/RightContent/index.tsx index 5e9b9e9e..5e560ca3 100644 --- a/example/src/components/RightContent/index.tsx +++ b/example/src/components/RightContent/index.tsx @@ -5,6 +5,7 @@ import { useModel, SelectLang } from 'umi'; import Avatar from './AvatarDropdown'; import HeaderSearch from '../HeaderSearch'; import styles from './index.less'; +import { useIntl } from 'umi'; export type SiderTheme = 'light' | 'dark'; @@ -52,7 +53,7 @@ const GlobalHeaderRight: React.FC<{}> = () => { // //console.log('input', value); // }} /> - + { diff --git a/example/src/locales/en-US.ts b/example/src/locales/en-US.ts index 3d579886..baf5806e 100644 --- a/example/src/locales/en-US.ts +++ b/example/src/locales/en-US.ts @@ -11,8 +11,10 @@ export default { 'layout.user.link.privacy': 'Privacy', 'layout.user.link.terms': 'Terms', 'app.preview.down.block': 'Download this page to your local project', - 'app.welcome.link.fetch-blocks': 'Get all block', - 'app.welcome.link.block-list': 'Quickly build standard, pages based on `block` development', + 'app.alert.umi-ui-available': 'umi ui is now available, click the umi icon in the lower right corner to use it', + 'app.alert.umi-ui-released': 'umi ui has been released, run `npm run ui` to try it out.', + 'app.welcome.link.fetch-blocks': 'Fetch all blocks', + 'app.welcome.link.block-list': 'Quickly build pages based on `block` development', ...globalHeader, ...menu, ...settingDrawer, diff --git a/example/src/locales/en-US/menu.ts b/example/src/locales/en-US/menu.ts index a737e697..943f186c 100644 --- a/example/src/locales/en-US/menu.ts +++ b/example/src/locales/en-US/menu.ts @@ -3,7 +3,12 @@ export default { 'menu.more-blocks': 'More Blocks', 'menu.home': 'Home', 'menu.admin': 'Admin', - 'menu.admin.sub-page': 'Sub-Page', + 'menu.admin.sub-page': 'Subpage', + 'menu.admin.sub-page2': 'Subpage 2', + 'menu.admin.sub-page3': 'Subpage 3', + 'menu.list.table-list.sub-page': 'Subpage', + 'menu.list.table-list.sub-page2': 'Subpage 2', + 'menu.list.table-list.sub-page3': 'Subpage 3', 'menu.login': 'Login', 'menu.register': 'Register', 'menu.register.result': 'Register Result', diff --git a/example/src/locales/en-US/settingDrawer.ts b/example/src/locales/en-US/settingDrawer.ts index a644905e..8a9e4de9 100644 --- a/example/src/locales/en-US/settingDrawer.ts +++ b/example/src/locales/en-US/settingDrawer.ts @@ -12,7 +12,7 @@ export default { 'app.setting.themecolor.cyan': 'Cyan', 'app.setting.themecolor.green': 'Polar Green', 'app.setting.themecolor.daybreak': 'Daybreak Blue (default)', - 'app.setting.themecolor.geekblue': 'Geek Glue', + 'app.setting.themecolor.geekblue': 'Geek Blue', 'app.setting.themecolor.purple': 'Golden Purple', 'app.setting.navigationmode': 'Navigation Mode', 'app.setting.sidemenu': 'Side Menu Layout', diff --git a/example/src/locales/pt-BR.ts b/example/src/locales/pt-BR.ts index ee3733bb..44bca56d 100644 --- a/example/src/locales/pt-BR.ts +++ b/example/src/locales/pt-BR.ts @@ -10,7 +10,9 @@ export default { 'layout.user.link.help': 'ajuda', 'layout.user.link.privacy': 'política de privacidade', 'layout.user.link.terms': 'termos de serviços', - 'app.preview.down.block': 'Download this page to your local project', + 'app.preview.down.block': 'Faça o download desta página no seu projeto local', + 'app.welcome.link.fetch-blocks': 'Buscar todos os blocos', + 'app.welcome.link.block-list': 'Crie páginas rapidamente com base no desenvolvimento de `block`', ...globalHeader, ...menu, ...settingDrawer, diff --git a/example/src/locales/pt-BR/globalHeader.ts b/example/src/locales/pt-BR/globalHeader.ts index c9273991..d232ca79 100644 --- a/example/src/locales/pt-BR/globalHeader.ts +++ b/example/src/locales/pt-BR/globalHeader.ts @@ -13,6 +13,5 @@ export default { 'component.noticeIcon.clear': 'Limpar', 'component.noticeIcon.cleared': 'Limpo', 'component.noticeIcon.empty': 'Sem notificações', - 'component.noticeIcon.loaded': 'Carregado', 'component.noticeIcon.view-more': 'Veja mais', }; diff --git a/example/src/locales/pt-BR/menu.ts b/example/src/locales/pt-BR/menu.ts index b87ebbba..c4f4ca43 100644 --- a/example/src/locales/pt-BR/menu.ts +++ b/example/src/locales/pt-BR/menu.ts @@ -1,10 +1,15 @@ export default { - 'menu.welcome': 'Welcome', - 'menu.more-blocks': 'More Blocks', + 'menu.welcome': 'Bem-vinda', + 'menu.more-blocks': 'Mais blocos', 'menu.home': 'Início', - 'menu.login': 'Login', 'menu.admin': 'Admin', - 'menu.admin.sub-page': 'Sub-Page', + 'menu.admin.sub-page': 'Subpágina', + 'menu.admin.sub-page2': 'Subpágina 2', + 'menu.admin.sub-page3': 'Subpágina 3', + 'menu.list.table-list.sub-page': 'Subpágina', + 'menu.list.table-list.sub-page2': 'Subpágina 2', + 'menu.list.table-list.sub-page3': 'Subpágina 3', + 'menu.login': 'Login', 'menu.register': 'Registro', 'menu.register.result': 'Resultado de registro', 'menu.dashboard': 'Dashboard', diff --git a/example/src/locales/pt-BR/settingDrawer.ts b/example/src/locales/pt-BR/settingDrawer.ts index 8a10b57e..0817f197 100644 --- a/example/src/locales/pt-BR/settingDrawer.ts +++ b/example/src/locales/pt-BR/settingDrawer.ts @@ -6,14 +6,14 @@ export default { 'app.setting.content-width.fixed': 'Fixo', 'app.setting.content-width.fluid': 'Fluido', 'app.setting.themecolor': 'Cor do Tema', - 'app.setting.themecolor.dust': 'Dust Red', - 'app.setting.themecolor.volcano': 'Volcano', + 'app.setting.themecolor.dust': 'Poeira Vermelha', + 'app.setting.themecolor.volcano': 'Vulcão', 'app.setting.themecolor.sunset': 'Sunset Orange', - 'app.setting.themecolor.cyan': 'Cyan', - 'app.setting.themecolor.green': 'Polar Green', - 'app.setting.themecolor.daybreak': 'Daybreak Blue (default)', - 'app.setting.themecolor.geekblue': 'Geek Glue', - 'app.setting.themecolor.purple': 'Golden Purple', + 'app.setting.themecolor.cyan': 'Ciano', + 'app.setting.themecolor.green': 'Verde Polar', + 'app.setting.themecolor.daybreak': 'Alvorada Azul (default)', + 'app.setting.themecolor.geekblue': 'Geek Azul', + 'app.setting.themecolor.purple': 'Roxo Dourado', 'app.setting.navigationmode': 'Modo de Navegação', 'app.setting.sidemenu': 'Layout do Menu Lateral', 'app.setting.topmenu': 'Layout do Menu Superior', diff --git a/example/src/locales/zh-CN.ts b/example/src/locales/zh-CN.ts index 1822d7ba..2f96d481 100644 --- a/example/src/locales/zh-CN.ts +++ b/example/src/locales/zh-CN.ts @@ -11,6 +11,8 @@ export default { 'layout.user.link.privacy': '隐私', 'layout.user.link.terms': '条款', 'app.preview.down.block': '下载此页面到本地项目', + 'app.alert.umi-ui-available': 'umi ui 现已发布,点击右下角 umi 图标即可使用', + 'app.alert.umi-ui-released': 'umi ui 现已发布,欢迎使用 npm run ui 启动体验。', 'app.welcome.link.fetch-blocks': '获取全部区块', 'app.welcome.link.block-list': '基于 block 开发,快速构建标准页面', ...globalHeader, diff --git a/example/src/pages/Admin.tsx b/example/src/pages/Admin.tsx index d0889b1f..5914f9da 100644 --- a/example/src/pages/Admin.tsx +++ b/example/src/pages/Admin.tsx @@ -2,12 +2,13 @@ import React from 'react'; import { HeartTwoTone, SmileTwoTone } from '@ant-design/icons'; import { Card, Typography, Alert } from 'antd'; import { PageContainer } from '../../../src/'; +import { useIntl } from 'umi'; export default (): React.ReactNode => ( = ({ children }) => (
@@ -12,10 +13,10 @@ const CodePreview: React.FC<{}> = ({ children }) => (
 );
 
 export default (): React.ReactNode => (
-  
+  
     
        (
       />
       
         
-          基于 block 开发,快速构建标准页面
+          {useIntl().formatMessage({ id: 'app.welcome.link.block-list' })}
         
       
        npm run ui
@@ -41,7 +42,7 @@ export default (): React.ReactNode => (
           rel="noopener noreferrer"
           href="https://pro.ant.design/docs/available-script#npm-run-fetchblocks"
         >
-          获取全部区块
+          {useIntl().formatMessage({ id: 'app.welcome.link.fetch-blocks' })}
         
       
        npm run fetch:blocks
diff --git a/src/locales/en-US/settingDrawer.ts b/src/locales/en-US/settingDrawer.ts
index 56961fce..c5d7a833 100644
--- a/src/locales/en-US/settingDrawer.ts
+++ b/src/locales/en-US/settingDrawer.ts
@@ -12,7 +12,7 @@ export default {
   'app.setting.themecolor.cyan': 'Cyan',
   'app.setting.themecolor.green': 'Polar Green',
   'app.setting.themecolor.daybreak': 'Daybreak Blue (default)',
-  'app.setting.themecolor.geekblue': 'Geek Glue',
+  'app.setting.themecolor.geekblue': 'Geek Blue',
   'app.setting.themecolor.purple': 'Golden Purple',
   'app.setting.navigationmode': 'Navigation Mode',
   'app.setting.regionalsettings': 'Regional Settings',
@@ -23,7 +23,7 @@ export default {
   'app.setting.sidemenu': 'Side Menu Layout',
   'app.setting.topmenu': 'Top Menu Layout',
   'app.setting.mixmenu': 'Mix Menu Layout',
-  'app.setting.splitMenus': 'split menus',
+  'app.setting.splitMenus': 'Split Menus',
   'app.setting.fixedheader': 'Fixed Header',
   'app.setting.fixedsidebar': 'Fixed Sidebar',
   'app.setting.fixedsidebar.hint': 'Works on Side Menu Layout',
diff --git a/src/locales/it-IT/settingDrawer.ts b/src/locales/it-IT/settingDrawer.ts
index dd23c058..f7e025ce 100644
--- a/src/locales/it-IT/settingDrawer.ts
+++ b/src/locales/it-IT/settingDrawer.ts
@@ -18,7 +18,7 @@ export default {
   'app.setting.sidemenu': 'Menu laterale',
   'app.setting.topmenu': 'Menu in testata',
   'app.setting.mixmenu': 'Menu misto',
-  'app.setting.splitMenus': 'split menus',
+  'app.setting.splitMenus': 'Menu divisi',
   'app.setting.fixedheader': 'Testata fissa',
   'app.setting.fixedsidebar': 'Menu laterale fisso',
   'app.setting.fixedsidebar.hint': 'Solo se selezionato Menu laterale',