Skip to content

Commit

Permalink
the problem of locale
Browse files Browse the repository at this point in the history
  • Loading branch information
wfnuser committed Jan 14, 2019
1 parent 2db55b1 commit 062cc07
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void configure(WebSecurity web) {
.antMatchers("/")
.antMatchers("/**/*.css", "/**/*.js", "/**/*.html", "/**/*.map", "/**/*.svg", "/**/*.png", "/**/*.ico")
.antMatchers("/**.css", "/**.js", "/**.html", "/**.map", "/**.svg", "/**.png", "/**.ico")
.antMatchers("/console-fe/public/*")
.antMatchers("/console-fe/public/**")
.antMatchers("/v1/auth/login")
.antMatchers("/v1/cs/health");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Header extends React.Component {
{pathname !== '/login' && (
<Dropdown trigger={<div className="logout">{this.getUsername()}</div>}>
<Menu>
<Menu.Item onClick={this.logout}>登出</Menu.Item>
<Menu.Item onClick={this.logout}>{locale.logout}</Menu.Item>
</Menu>
</Dropdown>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const I18N_CONF = {
blog: 'BLOG',
community: 'COMMUNITY',
languageSwitchButton: '中',
logout: 'logout',
},
Login: {
pleaseLogin: 'Plase login',
login: 'Login',
submit: 'Submit',
pleaseInputUsername: 'Please input username',
pleaseInputPassword: 'Please input password',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const I18N_CONF = {
blog: '博客',
community: '社区',
languageSwitchButton: 'En',
logout: '登出',
},
Login: {
pleaseLogin: '请登录',
login: '登录',
submit: '提交',
pleaseInputUsername: '请输入用户名',
pleaseInputPassword: '请输入密码',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const FormItem = Form.Item;
@withRouter
@ConfigProvider.config
class Login extends React.Component {
static displayName = 'Login';

handleSubmit = values => {
const { locale = {} } = this.props;
request({
Expand Down Expand Up @@ -65,7 +67,7 @@ class Login extends React.Component {
<div className="animation animation4" />
<div className="animation animation5" />
<Card className="login-panel" contentHeight="auto">
<div className="login-header">{locale.pleaseLogin}</div>
<div className="login-header">{locale.login}</div>
<Form className="login-form">
<FormItem>
<Input htmlType="text" name="username" placeholder={locale.pleaseInputUsername} />
Expand Down
4 changes: 2 additions & 2 deletions console/src/main/resources/static/js/main.js

Large diffs are not rendered by default.

0 comments on commit 062cc07

Please sign in to comment.