From 30dea4321eb854d6d479441d078aa21d1b20f0cc Mon Sep 17 00:00:00 2001 From: Pierre Ferreira Date: Fri, 10 Nov 2023 14:11:36 +0100 Subject: [PATCH] ajout de la traduction des indices en fonction de la langue choisi par l'utilisateur. :globe_with_meridians: --- cryptide_project/src/App.tsx | 2 +- cryptide_project/src/Pages/InGame.tsx | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cryptide_project/src/App.tsx b/cryptide_project/src/App.tsx index d90f6aa..ee9f323 100644 --- a/cryptide_project/src/App.tsx +++ b/cryptide_project/src/App.tsx @@ -70,7 +70,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> diff --git a/cryptide_project/src/Pages/InGame.tsx b/cryptide_project/src/Pages/InGame.tsx index 2eaba35..f3ef4ee 100644 --- a/cryptide_project/src/Pages/InGame.tsx +++ b/cryptide_project/src/Pages/InGame.tsx @@ -24,7 +24,11 @@ import { Link } from 'react-router-dom'; import Button from 'react-bootstrap/Button'; import Offcanvas from 'react-bootstrap/Offcanvas'; -const InGame = () => { +/* Model */ +import Stub from '../source/Stub'; + +//@ts-ignore +const InGame = ({locale}) => { const [showChoiceBar, setShowChoiceBar] = useState(false); const handleNodeClick = (shouldShowChoiceBar: boolean) => { @@ -66,6 +70,9 @@ const InGame = () => { window.open(url); }; + + const indices = Stub.GenerateIndice() + return (
@@ -131,7 +138,10 @@ const InGame = () => { Indice - Possède les cheveux noir ou joue au basket + {/* Possède les cheveux noir ou joue au basket */} + {indices[0].ToString(locale)}
+ {indices[1].ToString(locale)}
+ {indices[2].ToString(locale)}