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
d90d09c0
Commit
d90d09c0
authored
Oct 14, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve language select UI
parent
e11cb4af
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
21 deletions
+25
-21
src/components/GlobalHeader/index.js
src/components/GlobalHeader/index.js
+0
-1
src/components/SelectLang/index.js
src/components/SelectLang/index.js
+6
-4
src/components/SelectLang/index.less
src/components/SelectLang/index.less
+3
-0
src/locales/en-US.js
src/locales/en-US.js
+4
-4
src/locales/pt-BR.js
src/locales/pt-BR.js
+4
-4
src/locales/zh-CN.js
src/locales/zh-CN.js
+4
-4
src/locales/zh-TW.js
src/locales/zh-TW.js
+4
-4
No files found.
src/components/GlobalHeader/index.js
View file @
d90d09c0
...
...
@@ -36,7 +36,6 @@ export default class GlobalHeader extends PureComponent {
type
=
{
collapsed
?
'
menu-unfold
'
:
'
menu-fold
'
}
onClick
=
{
this
.
toggle
}
/
>
<
RightContent
{...
this
.
props
}
/
>
<
/div
>
);
...
...
src/components/SelectLang/index.js
View file @
d90d09c0
import
React
,
{
PureComponent
}
from
'
react
'
;
import
{
FormattedMessage
,
setLocale
,
getLocale
}
from
'
umi/locale
'
;
import
{
formatMessage
,
FormattedMessage
,
setLocale
,
getLocale
}
from
'
umi/locale
'
;
import
{
Menu
,
Icon
,
Dropdown
}
from
'
antd
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
...
...
@@ -30,9 +30,11 @@ export default class SelectLang extends PureComponent {
);
return
(
<
Dropdown
overlay
=
{
langMenu
}
>
<
span
className
=
{
classNames
(
styles
.
dropDown
,
className
)}
>
<
FormattedMessage
id
=
"
navBar.lang
"
/>
<
Icon
type
=
"
down
"
/>
<
/span
>
<
Icon
type
=
"
global
"
className
=
{
classNames
(
styles
.
dropDown
,
className
)}
title
=
{
formatMessage
({
id
:
'
navBar.lang
'
})}
/
>
<
/Dropdown
>
);
}
...
...
src/components/SelectLang/index.less
View file @
d90d09c0
...
...
@@ -11,4 +11,7 @@
.dropDown {
cursor: pointer;
font-size: 14px;
vertical-align: top;
line-height: 64px;
}
src/locales/en-US.js
View file @
d90d09c0
export
default
{
'
navBar.lang
'
:
'
Languages
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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
'
,
...
...
src/locales/pt-BR.js
View file @
d90d09c0
export
default
{
'
navBar.lang
'
:
'
Idiomas
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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
'
,
...
...
src/locales/zh-CN.js
View file @
d90d09c0
export
default
{
'
navBar.lang
'
:
'
语言
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
🇵🇹
Portuguese
'
,
'
layout.user.link.help
'
:
'
帮助
'
,
'
layout.user.link.privacy
'
:
'
隐私
'
,
'
layout.user.link.terms
'
:
'
条款
'
,
...
...
src/locales/zh-TW.js
View file @
d90d09c0
export
default
{
'
navBar.lang
'
:
'
語言
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
🇵🇹
Portuguese
'
,
'
layout.user.link.help
'
:
'
幫助
'
,
'
layout.user.link.privacy
'
:
'
隱私
'
,
'
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