Skip to content

Commit

Permalink
Localize the canonical url whenever it's possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Tug committed Jul 5, 2017
1 parent ca567cc commit defe7ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/login/wp-login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export class Login extends React.Component {
}

render() {
const { translate, twoFactorAuthType } = this.props;
const { locale, translate, twoFactorAuthType } = this.props;

const canonicalUrl = `https://${ locale !== 'en' ? locale + '.' : '' }wordpress.com/login`;

return (
<div>
Expand All @@ -79,7 +81,7 @@ export class Login extends React.Component {

<DocumentHead
title={ translate( 'Log In', { textOnly: true } ) }
link={ [ { rel: 'canonical', href: 'https://wordpress.com/login' } ] } />
link={ [ { rel: 'canonical', href: canonicalUrl } ] } />

<GlobalNotices id="notices" notices={ notices.list } />

Expand Down

0 comments on commit defe7ee

Please sign in to comment.