Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
cf2254fd
Commit
cf2254fd
authored
Oct 19, 2018
by
Rayron Victor
Committed by
偏右
Oct 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SelectLang: languages options don't need to be translated
parent
eece603c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
21 deletions
+17
-21
src/components/SelectLang/index.js
src/components/SelectLang/index.js
+17
-5
src/locales/en-US.js
src/locales/en-US.js
+0
-4
src/locales/pt-BR.js
src/locales/pt-BR.js
+0
-4
src/locales/zh-CN.js
src/locales/zh-CN.js
+0
-4
src/locales/zh-TW.js
src/locales/zh-TW.js
+0
-4
No files found.
src/components/SelectLang/index.js
View file @
cf2254fd
import
React
,
{
PureComponent
}
from
'
react
'
;
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
{
Menu
,
Icon
,
Dropdown
}
from
'
antd
'
;
import
classNames
from
'
classnames
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
...
@@ -15,16 +15,28 @@ export default class SelectLang extends PureComponent {
...
@@ -15,16 +15,28 @@ export default class SelectLang extends PureComponent {
const
langMenu
=
(
const
langMenu
=
(
<
Menu
className
=
{
styles
.
menu
}
selectedKeys
=
{[
selectedLang
]}
onClick
=
{
this
.
changLang
}
>
<
Menu
className
=
{
styles
.
menu
}
selectedKeys
=
{[
selectedLang
]}
onClick
=
{
this
.
changLang
}
>
<
Menu
.
Item
key
=
"
zh-CN
"
>
<
Menu
.
Item
key
=
"
zh-CN
"
>
<
FormattedMessage
id
=
"
lang.simplified-chinese
"
/>
<
span
role
=
"
img
"
aria
-
label
=
"
简体中文
"
>
🇨🇳
<
/span>{' '
}
简体中文
<
/Menu.Item
>
<
/Menu.Item
>
<
Menu
.
Item
key
=
"
zh-TW
"
>
<
Menu
.
Item
key
=
"
zh-TW
"
>
<
FormattedMessage
id
=
"
lang.traditional-chinese
"
/>
<
span
role
=
"
img
"
aria
-
label
=
"
繁体中文
"
>
🇭🇰
<
/span>{' '
}
繁体中文
<
/Menu.Item
>
<
/Menu.Item
>
<
Menu
.
Item
key
=
"
en-US
"
>
<
Menu
.
Item
key
=
"
en-US
"
>
<
FormattedMessage
id
=
"
lang.english
"
/>
<
span
role
=
"
img
"
aria
-
label
=
"
English
"
>
🇬🇧
<
/span>{' '
}
English
<
/Menu.Item
>
<
/Menu.Item
>
<
Menu
.
Item
key
=
"
pt-BR
"
>
<
Menu
.
Item
key
=
"
pt-BR
"
>
<
FormattedMessage
id
=
"
lang.portuguese
"
/>
<
span
role
=
"
img
"
aria
-
label
=
"
Português
"
>
🇵🇹
<
/span>{' '
}
Português
<
/Menu.Item
>
<
/Menu.Item
>
<
/Menu
>
<
/Menu
>
);
);
...
...
src/locales/en-US.js
View file @
cf2254fd
export
default
{
export
default
{
'
navBar.lang
'
:
'
Languages
'
,
'
navBar.lang
'
:
'
Languages
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳 简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰 繁体中文
'
,
'
lang.english
'
:
'
🇬🇧 English
'
,
'
lang.portuguese
'
:
'
🇵🇹 Portuguese
'
,
'
layout.user.link.help
'
:
'
Help
'
,
'
layout.user.link.help
'
:
'
Help
'
,
'
layout.user.link.privacy
'
:
'
Privacy
'
,
'
layout.user.link.privacy
'
:
'
Privacy
'
,
'
layout.user.link.terms
'
:
'
Terms
'
,
'
layout.user.link.terms
'
:
'
Terms
'
,
...
...
src/locales/pt-BR.js
View file @
cf2254fd
export
default
{
export
default
{
'
navBar.lang
'
:
'
Idiomas
'
,
'
navBar.lang
'
:
'
Idiomas
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳 简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰 繁体中文
'
,
'
lang.english
'
:
'
🇬🇧 English
'
,
'
lang.portuguese
'
:
'
🇵🇹 Portuguese
'
,
'
layout.user.link.help
'
:
'
ajuda
'
,
'
layout.user.link.help
'
:
'
ajuda
'
,
'
layout.user.link.privacy
'
:
'
política de privacidade
'
,
'
layout.user.link.privacy
'
:
'
política de privacidade
'
,
'
layout.user.link.terms
'
:
'
termos de serviços
'
,
'
layout.user.link.terms
'
:
'
termos de serviços
'
,
...
...
src/locales/zh-CN.js
View file @
cf2254fd
export
default
{
export
default
{
'
navBar.lang
'
:
'
语言
'
,
'
navBar.lang
'
:
'
语言
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳 简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰 繁体中文
'
,
'
lang.english
'
:
'
🇬🇧 English
'
,
'
lang.portuguese
'
:
'
🇵🇹 Portuguese
'
,
'
layout.user.link.help
'
:
'
帮助
'
,
'
layout.user.link.help
'
:
'
帮助
'
,
'
layout.user.link.privacy
'
:
'
隐私
'
,
'
layout.user.link.privacy
'
:
'
隐私
'
,
'
layout.user.link.terms
'
:
'
条款
'
,
'
layout.user.link.terms
'
:
'
条款
'
,
...
...
src/locales/zh-TW.js
View file @
cf2254fd
export
default
{
export
default
{
'
navBar.lang
'
:
'
語言
'
,
'
navBar.lang
'
:
'
語言
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳 简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰 繁体中文
'
,
'
lang.english
'
:
'
🇬🇧 English
'
,
'
lang.portuguese
'
:
'
🇵🇹 Portuguese
'
,
'
layout.user.link.help
'
:
'
幫助
'
,
'
layout.user.link.help
'
:
'
幫助
'
,
'
layout.user.link.privacy
'
:
'
隱私
'
,
'
layout.user.link.privacy
'
:
'
隱私
'
,
'
layout.user.link.terms
'
:
'
條款
'
,
'
layout.user.link.terms
'
:
'
條款
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment