fix(locale): remove hard coded strings (#3193)

This commit is contained in:
tiuweehan
2020-02-04 20:49:47 +08:00
committed by GitHub
parent 18e284ece8
commit fc91bf8781
15 changed files with 108 additions and 39 deletions

View File

@ -38,6 +38,7 @@ export default class AuthenticationPage extends React.Component {
onLogin: PropTypes.func.isRequired,
inProgress: PropTypes.bool,
config: PropTypes.object.isRequired,
t: PropTypes.func.isRequired,
};
handleLogin = e => {
@ -46,13 +47,13 @@ export default class AuthenticationPage extends React.Component {
};
render() {
const { config, inProgress } = this.props;
const { config, inProgress, t } = this.props;
return (
<StyledAuthenticationPage>
<PageLogoIcon size="300px" type="netlify-cms" />
<LoginButton disabled={inProgress} onClick={this.handleLogin}>
{inProgress ? 'Logging in...' : 'Login'}
{inProgress ? t('auth.loggingIn') : t('auth.login')}
</LoginButton>
{config.site_url && <GoBackButton href={config.site_url}></GoBackButton>}
</StyledAuthenticationPage>