feat: init translation
This commit is contained in:
@@ -14,8 +14,8 @@ import {ClubRoot, getClubChildren} from "./pages/club/ClubRoot.jsx";
|
||||
import {DemandeAff, DemandeAffOk} from "./pages/DemandeAff.jsx";
|
||||
import {MePage} from "./pages/MePage.jsx";
|
||||
import {CompetitionRoot, getCompetitionChildren} from "./pages/competition/CompetitionRoot.jsx";
|
||||
import {FallingLines} from "react-loader-spinner";
|
||||
import {getResultChildren, ResultRoot} from "./pages/result/ResultRoot.jsx";
|
||||
import {useTranslation} from "react-i18next";
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
@@ -79,10 +79,12 @@ const router = createBrowserRouter([
|
||||
|
||||
function GetCompetitionMangerLazy() {
|
||||
const CMLazy = lazy(() => import('./pages/competition/editor/CompetitionManagerRoot.jsx'))
|
||||
const {t} = useTranslation();
|
||||
|
||||
return <Suspense
|
||||
fallback={<div>
|
||||
<h1>Compétition manager</h1>
|
||||
<p>Chargement...</p>
|
||||
<h1>{t("comp_manage")}</h1>
|
||||
<p>{t("loading")}</p>
|
||||
</div>}>
|
||||
<CMLazy/>
|
||||
</Suspense>
|
||||
@@ -144,6 +146,7 @@ function Root() {
|
||||
function ReAuthMsg() {
|
||||
const {is_authenticated} = useAuth()
|
||||
const location = useLocation()
|
||||
const {t} = useTranslation();
|
||||
|
||||
const notAuthPaths = [
|
||||
/^\/$/s,
|
||||
@@ -161,15 +164,14 @@ function ReAuthMsg() {
|
||||
}}>
|
||||
<div className="card">
|
||||
<div className="card-header">
|
||||
<h5>Session expirée</h5>
|
||||
<h5>{t("outdated_session.title")}</h5>
|
||||
</div>
|
||||
<div className="card-body">
|
||||
<p className="card-text">Votre session a expirée, veuillez vous reconnecter pour continuer à
|
||||
utiliser l'application.</p>
|
||||
<p className="card-text">{t("outdated_session.message")}</p>
|
||||
</div>
|
||||
<div className="card-footer">
|
||||
<button className="btn btn-primary" onClick={() => login()} style={{marginRight: "0.5em"}}>Se reconnecter</button>
|
||||
<a className="btn btn-secondary" href="/">Accueil</a>
|
||||
<button className="btn btn-primary" onClick={() => login()} style={{marginRight: "0.5em"}}>{t("outdated_session.login_button")}</button>
|
||||
<a className="btn btn-secondary" href="/">{t("nav.home")}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user