diff --git a/app/soapbox/features/public_layout/components/header.js b/app/soapbox/features/public_layout/components/header.js index 70c20dcaa..173df7307 100644 --- a/app/soapbox/features/public_layout/components/header.js +++ b/app/soapbox/features/public_layout/components/header.js @@ -6,14 +6,18 @@ import { Link } from 'react-router-dom'; import LoginForm from 'soapbox/features/auth_login/components/login_form'; import SiteLogo from './site_logo'; import SoapboxPropTypes from 'soapbox/utils/soapbox_prop_types'; +import { defineMessages, injectIntl } from 'react-intl'; +import PropTypes from 'prop-types'; import { logIn } from 'soapbox/actions/auth'; import { fetchMe } from 'soapbox/actions/me'; -import PropTypes from 'prop-types'; import OtpAuthForm from 'soapbox/features/auth_login/components/otp_auth_form'; import IconButton from 'soapbox/components/icon_button'; -import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ + home: { id: 'header.home.label', defaultMessage: 'Home' }, + about: { id: 'header.about.label', defaultMessage: 'About' }, + backTo: { id: 'header.back_to.label', defaultMessage: 'Back to {siteTitle}' }, + login: { id: 'header.login.label', defaultMessage: 'Log in' }, close: { id: 'lightbox.close', defaultMessage: 'Close' }, }); @@ -64,6 +68,7 @@ class Header extends ImmutablePureComponent { static propTypes = { me: SoapboxPropTypes.me, instance: ImmutablePropTypes.map, + intl: PropTypes.object.isRequired, } state = { @@ -90,21 +95,21 @@ class Header extends ImmutablePureComponent { - Home - About + {intl.formatMessage(messages.home)} + {intl.formatMessage(messages.about)}
{me - ? Back to {instance.get('title')} + ? {intl.formatMessage(messages.backTo, { siteTitle: instance.get('title') })} : }
{me - ? Back to {instance.get('title')} - : Log in + ? {intl.formatMessage(messages.backTo, { siteTitle: instance.get('title') })} + : {intl.formatMessage(messages.login)} }