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
P
pro-blocks
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
pro-blocks
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 {
...
@@ -36,7 +36,6 @@ export default class GlobalHeader extends PureComponent {
type
=
{
collapsed
?
'
menu-unfold
'
:
'
menu-fold
'
}
type
=
{
collapsed
?
'
menu-unfold
'
:
'
menu-fold
'
}
onClick
=
{
this
.
toggle
}
onClick
=
{
this
.
toggle
}
/
>
/
>
<
RightContent
{...
this
.
props
}
/
>
<
RightContent
{...
this
.
props
}
/
>
<
/div
>
<
/div
>
);
);
...
...
src/components/SelectLang/index.js
View file @
d90d09c0
import
React
,
{
PureComponent
}
from
'
react
'
;
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
{
Menu
,
Icon
,
Dropdown
}
from
'
antd
'
;
import
classNames
from
'
classnames
'
;
import
classNames
from
'
classnames
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
...
@@ -30,9 +30,11 @@ export default class SelectLang extends PureComponent {
...
@@ -30,9 +30,11 @@ export default class SelectLang extends PureComponent {
);
);
return
(
return
(
<
Dropdown
overlay
=
{
langMenu
}
>
<
Dropdown
overlay
=
{
langMenu
}
>
<
span
className
=
{
classNames
(
styles
.
dropDown
,
className
)}
>
<
Icon
<
FormattedMessage
id
=
"
navBar.lang
"
/>
<
Icon
type
=
"
down
"
/>
type
=
"
global
"
<
/span
>
className
=
{
classNames
(
styles
.
dropDown
,
className
)}
title
=
{
formatMessage
({
id
:
'
navBar.lang
'
})}
/
>
<
/Dropdown
>
<
/Dropdown
>
);
);
}
}
...
...
src/components/SelectLang/index.less
View file @
d90d09c0
...
@@ -11,4 +11,7 @@
...
@@ -11,4 +11,7 @@
.dropDown {
.dropDown {
cursor: pointer;
cursor: pointer;
font-size: 14px;
vertical-align: top;
line-height: 64px;
}
}
src/locales/en-US.js
View file @
d90d09c0
export
default
{
export
default
{
'
navBar.lang
'
:
'
Languages
'
,
'
navBar.lang
'
:
'
Languages
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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 @
d90d09c0
export
default
{
export
default
{
'
navBar.lang
'
:
'
Idiomas
'
,
'
navBar.lang
'
:
'
Idiomas
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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 @
d90d09c0
export
default
{
export
default
{
'
navBar.lang
'
:
'
语言
'
,
'
navBar.lang
'
:
'
语言
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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 @
d90d09c0
export
default
{
export
default
{
'
navBar.lang
'
:
'
語言
'
,
'
navBar.lang
'
:
'
語言
'
,
'
lang.simplified-chinese
'
:
'
简体中文
'
,
'
lang.simplified-chinese
'
:
'
🇨🇳
简体中文
'
,
'
lang.traditional-chinese
'
:
'
繁体中文
'
,
'
lang.traditional-chinese
'
:
'
🇭🇰
繁体中文
'
,
'
lang.english
'
:
'
English
'
,
'
lang.english
'
:
'
🇬🇧
English
'
,
'
lang.portuguese
'
:
'
Portuguese
'
,
'
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