From 2757fa23932d96786b3897b6e4539783ec5d3338 Mon Sep 17 00:00:00 2001 From: gauvainboiche Date: Mon, 30 Mar 2026 16:54:08 +0200 Subject: [PATCH] feat: Translation into French of most infos, but not the server debugging infos --- public/index.html | 62 +++++++++++++++++++++++----------------------- public/src/game.js | 34 ++++++++++++------------- public/style.css | 3 ++- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/public/index.html b/public/index.html index d3632fb..d9aa5c2 100644 --- a/public/index.html +++ b/public/index.html @@ -11,64 +11,64 @@
- - + +
- +
- +
- +
- Team + Équipe
- - + +
@@ -83,8 +83,8 @@
-
Star Wars – Wild Space
-
100×100 — exploitable zone from playground SVG map
+
Star Wars - Wild Space
+
Explorez les Régions Inconnues pour faire triompher votre camp !
@@ -123,21 +123,21 @@
- Player + Joueur - +
- Cooldown + Prochain clic 0 s
- Temps avant prochain clic + Délai entre deux clics
@@ -153,15 +153,15 @@ --:--:--
- Base de données depuis + Graine actuelle depuis
- 🪐 Planet stats -
Stats are hidden until you click a tile.
+ 🪐 Statistiques Planétaires +
Les stats sont vides sauf à cliquer sur une tuile exploitable.
@@ -194,7 +194,7 @@
- 💰 Ressources économiques + 💰 Ressources

Chargement…

@@ -202,7 +202,7 @@
-
⚡ Bonus de recharge planétaire
+
⚡ Bonus d'exploration
Résistance @@ -217,7 +217,7 @@
- Recharge effective (votre équipe) : + Recharge d'équipe :
@@ -228,10 +228,10 @@ ⚙ Options
- - + +
- +
@@ -244,7 +244,7 @@ -
Click a cell in the ring. Planet stats stay hidden until you reveal a tile.
+
Cliquez sur une tuile. Les stats seront vides à moins de cliquer.
diff --git a/public/src/game.js b/public/src/game.js index d0497e3..c1c07e7 100644 --- a/public/src/game.js +++ b/public/src/game.js @@ -579,17 +579,17 @@ function applyRevealPayload(cell) { }); details.classList.remove("details--hidden"); if (!cell.exploitable) { - hint.textContent = `(${cell.x},${cell.y}) not exploitable.`; - details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus: Not exploitable.`; + hint.textContent = `(${cell.x},${cell.y}) Inexploitable`; + details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus : Inexploitable`; return; } if (!cell.hasPlanet) { - hint.textContent = `(${cell.x},${cell.y}) exploitable — empty.`; - details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus: Exploitable\nContains: Nothing`; + hint.textContent = `(${cell.x},${cell.y}) Vide`; + details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus : Vide`; return; } - hint.textContent = `(${cell.x},${cell.y}) exploitable — planet revealed.`; - details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus: Exploitable\nContains: Planet\n\n${formatPlanet(cell.planet)}`; + hint.textContent = `(${cell.x},${cell.y}) Planète présente`; + details.textContent = `Cell (${cell.x},${cell.y})\n\nStatus : Planète\n\n${formatPlanet(cell.planet)}`; } function showLocalSelection(x, y) { @@ -597,14 +597,14 @@ function showLocalSelection(x, y) { details.classList.remove("details--hidden"); if (!isOwnTile(k)) return; if (!isExploitable(x, y)) { - hint.textContent = `(${x},${y}) not exploitable.`; - details.textContent = `Cell (${x},${y})\n\nStatus: Not exploitable.`; + hint.textContent = `(${x},${y}) Inexploitable`; + details.textContent = `Cell (${x},${y})\n\nStatus : Inexploitable`; return; } const meta = cellMeta(k); if (!meta?.hasPlanet) { - hint.textContent = `(${x},${y}) exploitable — empty.`; - details.textContent = `Cell (${x},${y})\n\nStatus: Exploitable\nContains: Nothing`; + hint.textContent = `(${x},${y}) Vide`; + details.textContent = `Cell (${x},${y})\n\nStatus : Vide`; return; } let planet = meta.planet; @@ -612,8 +612,8 @@ function showLocalSelection(x, y) { const h = hash2u32(x, y, seedU32 ^ 0xa5a5a5a5); planet = generatePlanet(mulberry32(h)); } - hint.textContent = `(${x},${y}) exploitable — planet.`; - details.textContent = `Cell (${x},${y})\n\nStatus: Exploitable\nContains: Planet\n\n${formatPlanet(planet)}`; + hint.textContent = `(${x},${y}) Planète présente`; + details.textContent = `Cell (${x},${y})\n\nStatus : Planète\n\n${formatPlanet(planet)}`; } // ── Canvas click handler ────────────────────────────────────────────────────── @@ -628,20 +628,20 @@ async function onCanvasClick(ev) { if (isOwnTile(key)) { showLocalSelection(cell.x, cell.y); return; } if (cooldownActive()) { - hint.textContent = "Cooldown active — reveal a tile your team already discovered to view stats."; + hint.textContent = "Clic indisponible — attendez la fin du délai ou cliquez sur une tuile déjà découverte."; return; } try { const res = await apiRevealCell(seedStr, cell.x, cell.y, currentTeam); if (res.status === 409) { - hint.textContent = "This tile was already discovered by the other team."; + hint.textContent = "Cette tuile a déjà été découverte par votre adversaire."; await fetchGridForSeed(seedStr); draw(); return; } if (res.status === 410) { - hint.textContent = "World period changed — syncing."; + hint.textContent = "Le serveur change sa base de planètes — synchronisation..."; await refreshFromServer(); return; } @@ -687,9 +687,9 @@ export async function refreshFromServer() { clearCooldown(); resetEconScores(); loadEconScores(); - details.textContent = "Stats are hidden until you click a tile."; + details.textContent = "Les stats sont vides jusqu'au clic sur une tuile."; details.classList.add("details--hidden"); - hint.textContent = "World period changed — grid reset. Click a cell in the playfield."; + hint.textContent = "Le monde a été réinitilisaté. Vous pouvez cliquer sur une tuile pour recommencer le jeu."; } await fetchGridForSeed(seedStr); await fetchAndApplyScores(); diff --git a/public/style.css b/public/style.css index 6fcbaff..67885d1 100644 --- a/public/style.css +++ b/public/style.css @@ -11,7 +11,8 @@ body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; color: #e9eef6; - background: radial-gradient(1200px 800px at 10% 10%, #16223a 0%, #0b1020 55%, #070a14 100%); + /* background: radial-gradient(1200px 800px at 10% 10%, #16223a 0%, #0b1020 55%, #070a14 100%); */ + background: black; min-height: 100vh; }