fix: api connection (#72)
* fix: api connection * fix: confirm page with delayed election * fix: fr translationpull/73/head
parent
720a9d990d
commit
4c2759d8c9
@ -1,35 +1,40 @@
|
||||
import Link from 'next/link'
|
||||
import {Container, Row, Col} from "reactstrap";
|
||||
import {useTranslation} from "next-i18next";
|
||||
import Link from "next/link";
|
||||
import { Container, Row, Col } from "reactstrap";
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
|
||||
const Error = props => {
|
||||
const {t} = useTranslation();
|
||||
const Error = (props) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Container>
|
||||
<Row>
|
||||
<Link href="/">
|
||||
<a className="d-block ml-auto mr-auto mb-4">
|
||||
<img src="/logos/logo-line-white.svg" alt="logo" height="128" />
|
||||
</a>
|
||||
</Link>
|
||||
</Row>
|
||||
<Row className="mt-4">
|
||||
<Col className="text-center">
|
||||
<h4>{props.value}</h4>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="mt-4">
|
||||
<Col className="text-center">
|
||||
<Container>
|
||||
<Row>
|
||||
<Link href="/">
|
||||
<a className="btn btn-secondary">
|
||||
{ t("common.backHomepage") }
|
||||
</a>
|
||||
<a className="d-block ml-auto mr-auto mb-4">
|
||||
<img src="/logos/logo-line-white.svg" alt="logo" height="128" />
|
||||
</a>
|
||||
</Link>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
</Row>
|
||||
<Row className="mt-4">
|
||||
<Col className="text-center">
|
||||
<h4>{props.value}</h4>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="mt-4">
|
||||
<Col className="text-right mr-4">
|
||||
<Link href="/">
|
||||
<a className="btn btn-secondary">{t("common.backHomepage")}</a>
|
||||
</Link>
|
||||
</Col>
|
||||
<Col className="text-left ml-4">
|
||||
<a
|
||||
href="mailto:app@mieuxvoter.fr?subject=[HELP]"
|
||||
className="btn btn-success"
|
||||
>
|
||||
{t("resource.help")}
|
||||
</a>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
||||
export default Error
|
||||
export default Error;
|
||||
|
@ -1,9 +1,9 @@
|
||||
module.exports = {
|
||||
i18n: {
|
||||
defaultLocale: 'fr',
|
||||
locales: ['en', 'fr', 'de', 'es', 'ru'],
|
||||
ns: ["resource", "common"],
|
||||
defaultLocale: "fr",
|
||||
locales: ["en", "fr", "de", "es", "ru"],
|
||||
ns: ["resource", "common", "error"],
|
||||
defaultNS: "resource",
|
||||
fallbackNS: ["common"],
|
||||
fallbackNS: ["common", "error"],
|
||||
},
|
||||
}
|
||||
};
|
||||
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"error.e1": "Oops... The election is unknown",
|
||||
"error.e2": "The election is still going on. You can't access now to the results.",
|
||||
"error.e3": "No votes have been recorded yet. Come back later.",
|
||||
"error.e4": "The election has not started yet.",
|
||||
"error.e5": "The election is over. You can't vote anymore",
|
||||
"error.e6": "You need a token to vote in this election",
|
||||
"error.e7": "You seem to have already voted.",
|
||||
"error.e8": "The parameters of the election are incorrect.",
|
||||
"error.catch22": "Unknown error"
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"error.e1": "Impossible de retrouver le vote en question",
|
||||
"error.e2": "L'élection est encore en cours. Revenez plus tard.",
|
||||
"error.e3": "Aucun vote n'a encore été enregistré. Revenez plus tard.",
|
||||
"error.e4": "L'élection n'a pas encore démarrée.",
|
||||
"error.e5": "L'élection est terminée. Vous ne pouvez plus voter.",
|
||||
"error.e6": "Vous avez besoin d'un jeton pour participer à cette élection.",
|
||||
"error.e7": "Vous avez déjà voté pour cette élection.",
|
||||
"error.e8": "Les paramètres de l'élection sont inconnues.",
|
||||
"error.catch22": "Erreur inconnue."
|
||||
}
|
Loading…
Reference in new issue