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 1 year ago
parent 19d95804dd
commit 20822a2311

@ -94,11 +94,11 @@ function App() {
<Route path={`${basePath}/signup`} element={<SignUp />} /> <Route path={`${basePath}/signup`} element={<SignUp />} />
<Route path={`${basePath}/presentation`} element={<Home />} /> <Route path={`${basePath}/presentation`} element={<Home />} />
<Route path={`${basePath}/lobby`} element={<Lobby/>} /> <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}/game`} element={<InGame locale={locale} changeLocale={changeLocale}/>}/>
<Route path={`${basePath}/info`} element={<InfoPage 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}/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}/TheRealDeduc`} element={<DeducGrid/>} />
<Route path={`${basePath}/profile`} element={<Profile/>} /> <Route path={`${basePath}/profile`} element={<Profile/>} />
<Route path={`${basePath}/join`} element={<Lobbies/>}/> <Route path={`${basePath}/join`} element={<Lobbies/>}/>

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

@ -41,7 +41,7 @@ import {basePath} from "../AdressSetup"
function EndGame() { function EndGame({lang}: {lang: string}) {
const {networkData, seed} = useGame(); const {networkData, seed} = useGame();
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
@ -160,7 +160,7 @@ function EndGame() {
<div className='winner'> <div className='winner'>
<img src={Person} width='250' height='250'/> <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>
<div className='bottomEnd'> <div className='bottomEnd'>
{/* <div className='centerDivH' onClick={resetAll}> {/* <div className='centerDivH' onClick={resetAll}>
@ -171,7 +171,7 @@ function EndGame() {
player.id !== winner?.id && ( player.id !== winner?.id && (
<div className="playerContainer" key={index}> <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}/> <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> </div>
) )
))} ))}
@ -201,7 +201,7 @@ function EndGame() {
{indices.map((indice, index) => ( {indices.map((indice, index) => (
// <div className="playerContainer" key={index}> // <div className="playerContainer" key={index}>
<div> <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>
//</div> //</div>
)) ))

Loading…
Cancel
Save