feat: localization (#196)

* Started adding locale translations :)

* Added some more translations

* Working on translating even more pages

* More translations

* Added test default locale retrieval

* replace `intl.formatMessage` with custom `t` hook

* add more translations

* improve title syntax

* add more translations

* translate admin config page

* translated error messages

* add language selecter

* minor fixes

* improve language handling

* add upcoming languages

* add `crowdin.yml`

* run formatter

---------

Co-authored-by: Steve Tautonico <stautonico@gmail.com>
This commit is contained in:
Elias Schneider
2023-07-20 15:32:07 +02:00
committed by GitHub
parent 7c5ec8d0ea
commit b9f6e3bd08
68 changed files with 4712 additions and 461 deletions

View File

@@ -8,6 +8,7 @@ import {
} from "@mantine/core";
import Link from "next/link";
import Meta from "../components/Meta";
import { FormattedMessage } from "react-intl";
const useStyles = createStyles((theme) => ({
root: {
@@ -42,9 +43,11 @@ const ErrorNotFound = () => {
<>
<Meta title="Not found" />
<Container className={classes.root}>
<div className={classes.label}>404</div>
<div className={classes.label}>
<FormattedMessage id="404.title" />
</div>
<Title align="center" order={3}>
Oops this page doesn't exist.
<FormattedMessage id="404.description" />
</Title>
<Text
color="dimmed"
@@ -53,7 +56,7 @@ const ErrorNotFound = () => {
></Text>
<Group position="center">
<Button component={Link} href="/" variant="light">
Bring me back
<FormattedMessage id="404.button.home" />
</Button>
</Group>
</Container>