changement de tout les tostring fr pour qu'ils aient la langue dynamique
continuous-integration/drone/push Build is passing Details

pull/109/head
Pierre Ferreira 10 months ago
parent 19d95804dd
commit 20822a2311

@ -94,11 +94,11 @@ function App() {
<Route path={`${basePath}/signup`} element={<SignUp />} />
<Route path={`${basePath}/presentation`} element={<Home />} />
<Route path={`${basePath}/lobby`} element={<Lobby/>} />
<Route path={`${basePath}/endgame`} element={<EndGame/>} />
<Route path={`${basePath}/endgame`} element={<EndGame lang={locale}/>} />
<Route path={`${basePath}/game`} element={<InGame locale={locale} changeLocale={changeLocale}/>}/>
<Route path={`${basePath}/info`} element={<InfoPage locale={locale} changeLocale={changeLocale}/>} />
<Route path={`${basePath}/tutorial`} element={<Tutorial locale={locale} changeLocale={changeLocale}/>} />
<Route path={`${basePath}/deduc`} element={<DeducCheck/>} />
<Route path={`${basePath}/deduc`} element={<DeducCheck lang={locale}/>} />
<Route path={`${basePath}/TheRealDeduc`} element={<DeducGrid/>} />
<Route path={`${basePath}/profile`} element={<Profile/>} />
<Route path={`${basePath}/join`} element={<Lobbies/>}/>

@ -19,7 +19,7 @@ import Stub from '../model/Stub';
import { useGame } from '../Contexts/GameContext';
import { positionToEmoji } from '../ColorHelper';
function DeducCheck() {
function DeducCheck({lang}: {lang: string}) {
const theme = useTheme();
//const indices = Stub.GenerateIndice();
@ -76,7 +76,7 @@ function DeducCheck() {
<tbody>
{firstHalfIndices.map((indice, rowIndex) => (
<tr key={rowIndex}>
<td>{indice.ToString("fr")}</td>
<td>{indice.ToString(lang)}</td>
{players.map((player, colIndex) => (
<td key={colIndex}>
{/* <input type="checkbox"/> */}
@ -101,7 +101,7 @@ function DeducCheck() {
<tbody>
{secondHalfIndices.map((indice, rowIndex) => (
<tr key={rowIndex}>
<td>{indice.ToString("fr")}</td>
<td>{indice.ToString(lang)}</td>
{players.map((player, colIndex) => (
<td key={colIndex}>
{/* <input type="checkbox"/> */}

@ -41,7 +41,7 @@ import {basePath} from "../AdressSetup"
function EndGame() {
function EndGame({lang}: {lang: string}) {
const {networkData, seed} = useGame();
const params = new URLSearchParams(window.location.search);
@ -160,7 +160,7 @@ function EndGame() {
<div className='winner'>
<img src={Person} width='250' height='250'/>
{!indicenull && (<h3 className='indiceDisplay'>{indices[players.findIndex((p) => p.id == winner?.id)].ToString("fr")}</h3>)}
{!indicenull && (<h3 className='indiceDisplay'>{indices[players.findIndex((p) => p.id == winner?.id)].ToString(lang)}</h3>)}
</div>
<div className='bottomEnd'>
{/* <div className='centerDivH' onClick={resetAll}>
@ -171,7 +171,7 @@ function EndGame() {
player.id !== winner?.id && (
<div className="playerContainer" key={index}>
<PersonStatus img={Person} state={Person} key={index} name={player.pseudo} playerTouched={1} setPlayerTouched={() => {}} index={index} playerIndex={-2} showCircle={false} askedWrong={false}/>
{!indicenull && (<h6 className='indiceDisplay'>{indices[players.findIndex((p) => p.id == player?.id)].ToString("fr")}</h6>)}
{!indicenull && (<h6 className='indiceDisplay'>{indices[players.findIndex((p) => p.id == player?.id)].ToString(lang)}</h6>)}
</div>
)
))}
@ -201,7 +201,7 @@ function EndGame() {
{indices.map((indice, index) => (
// <div className="playerContainer" key={index}>
<div>
<h6 className='indiceDisplay'> <u>Indice {index+1}</u> : {indice.ToString("fr")}</h6>
<h6 className='indiceDisplay'> <u>Indice {index+1}</u> : {indice.ToString(lang)}</h6>
</div>
//</div>
))

Loading…
Cancel
Save