From cf2254fd97afdf4495408e152eee0b9b0e909fab Mon Sep 17 00:00:00 2001 From: Rayron Victor Date: Fri, 19 Oct 2018 09:30:46 -0300 Subject: [PATCH] SelectLang: languages options don't need to be translated --- src/components/SelectLang/index.js | 22 +++++++++++++++++----- src/locales/en-US.js | 4 ---- src/locales/pt-BR.js | 4 ---- src/locales/zh-CN.js | 4 ---- src/locales/zh-TW.js | 4 ---- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/components/SelectLang/index.js b/src/components/SelectLang/index.js index e8cba6f2..c562f99c 100644 --- a/src/components/SelectLang/index.js +++ b/src/components/SelectLang/index.js @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react'; -import { formatMessage, FormattedMessage, setLocale, getLocale } from 'umi/locale'; +import { formatMessage, setLocale, getLocale } from 'umi/locale'; import { Menu, Icon, Dropdown } from 'antd'; import classNames from 'classnames'; import styles from './index.less'; @@ -15,16 +15,28 @@ export default class SelectLang extends PureComponent { const langMenu = ( - + + 🇨🇳 + {' '} + 简体中文 - + + 🇭🇰 + {' '} + 繁体中文 - + + 🇬🇧 + {' '} + English - + + 🇵🇹 + {' '} + Português ); diff --git a/src/locales/en-US.js b/src/locales/en-US.js index 77455a91..39ace0f8 100644 --- a/src/locales/en-US.js +++ b/src/locales/en-US.js @@ -1,9 +1,5 @@ export default { 'navBar.lang': 'Languages', - 'lang.simplified-chinese': '🇨🇳 简体中文', - 'lang.traditional-chinese': '🇭🇰 繁体中文', - 'lang.english': '🇬🇧 English', - 'lang.portuguese': '🇵🇹 Portuguese', 'layout.user.link.help': 'Help', 'layout.user.link.privacy': 'Privacy', 'layout.user.link.terms': 'Terms', diff --git a/src/locales/pt-BR.js b/src/locales/pt-BR.js index e170bf74..d11f1444 100644 --- a/src/locales/pt-BR.js +++ b/src/locales/pt-BR.js @@ -1,9 +1,5 @@ export default { 'navBar.lang': 'Idiomas', - 'lang.simplified-chinese': '🇨🇳 简体中文', - 'lang.traditional-chinese': '🇭🇰 繁体中文', - 'lang.english': '🇬🇧 English', - 'lang.portuguese': '🇵🇹 Portuguese', 'layout.user.link.help': 'ajuda', 'layout.user.link.privacy': 'política de privacidade', 'layout.user.link.terms': 'termos de serviços', diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js index 417e2964..cf2b12bf 100644 --- a/src/locales/zh-CN.js +++ b/src/locales/zh-CN.js @@ -1,9 +1,5 @@ export default { 'navBar.lang': '语言', - 'lang.simplified-chinese': '🇨🇳 简体中文', - 'lang.traditional-chinese': '🇭🇰 繁体中文', - 'lang.english': '🇬🇧 English', - 'lang.portuguese': '🇵🇹 Portuguese', 'layout.user.link.help': '帮助', 'layout.user.link.privacy': '隐私', 'layout.user.link.terms': '条款', diff --git a/src/locales/zh-TW.js b/src/locales/zh-TW.js index b7c52af6..8f588fe5 100644 --- a/src/locales/zh-TW.js +++ b/src/locales/zh-TW.js @@ -1,9 +1,5 @@ export default { 'navBar.lang': '語言', - 'lang.simplified-chinese': '🇨🇳 简体中文', - 'lang.traditional-chinese': '🇭🇰 繁体中文', - 'lang.english': '🇬🇧 English', - 'lang.portuguese': '🇵🇹 Portuguese', 'layout.user.link.help': '幫助', 'layout.user.link.privacy': '隱私', 'layout.user.link.terms': '條款', -- GitLab