Remove all *.intl.json files. Move strings to the corresponding views. Implement custom command to build i18n/en.json file

This commit is contained in:
ErickSkrauch
2020-06-04 19:41:27 +03:00
parent 57cf6b3776
commit bf6a76d006
107 changed files with 1122 additions and 972 deletions

View File

@@ -1,6 +0,0 @@
{
"title": "Page not found",
"nothingHere": "This is not a place that you are looking for",
"returnToTheHomePage": "Try to go back to the {link}",
"homePage": "main page"
}

View File

@@ -5,12 +5,13 @@ import { Helmet } from 'react-helmet-async';
import { FooterMenu } from 'app/components/footerMenu';
import styles from './404.scss';
import messages from './PageNotFound.intl.json';
import profileStyles from '../profile/profile.scss';
const PageNotFound: ComponentType = () => (
<div className={styles.page}>
<Message {...messages.title}>{(pageTitle) => <Helmet title={pageTitle as string} />}</Message>
<Message key="title" defaultMessage="Page not found">
{(pageTitle) => <Helmet title={pageTitle as string} />}
</Message>
<div className={styles.loading}>
<div className={styles.cube} />
@@ -29,15 +30,16 @@ const PageNotFound: ComponentType = () => (
</div>
</div>
<p className={styles.text}>
<Message {...messages.nothingHere} />
<Message key="nothingHere" defaultMessage="This is not a place that you are looking for" />
</p>
<p className={styles.subText}>
<Message
{...messages.returnToTheHomePage}
key="returnToTheHomePage"
defaultMessage="Try to go back to the {link}"
values={{
link: (
<Link to="/">
<Message {...messages.homePage} />
<Message key="homePage" defaultMessage="main page" />
</Link>
),
}}