translate in english

This commit is contained in:
Didictateur 2026-02-04 09:38:08 +01:00
parent 6e371aa107
commit 9859c4bfb2

View file

@ -17,16 +17,16 @@
<div id="container"> <div id="container">
<h2>Cemantle Solver</h2> <h2>Cemantle Solver</h2>
<div id="setup"> <div id="setup">
<label>Mot de départ : <input id="firstWord" type="text" /></label> <label>Initial word : <input id="firstWord" type="text" /></label>
<label>Score de départ : <input id="firstScore" type="number" min="0" max="1000" /></label> <label>Initial score : <input id="firstScore" type="number" min="0" max="1000" /></label>
<button id="startBtn">Démarrer</button> <button id="startBtn">Start</button>
<span id="loading" style="display:none; margin-left:1em; color:#0077cc;">Chargement</span> <span id="loading" style="display:none; margin-left:1em; color:#0077cc;">Loading</span>
</div> </div>
<div id="game" style="display:none;"> <div id="game" style="display:none;">
<div id="word"></div> <div id="word"></div>
<label for="scoreInput">Score :</label> <label for="scoreInput">Score :</label>
<input type="number" id="scoreInput" min="0" max="1000" /> <input type="number" id="scoreInput" min="-100" max="100" />
<button id="submitScoreBtn">Valider</button> <button id="submitScoreBtn">Continue</button>
<!--button id="skipWordBtn" style="margin-left:1em;">Passer</button!--> <!--button id="skipWordBtn" style="margin-left:1em;">Passer</button!-->
<div id="result"></div> <div id="result"></div>
<div id="remaining"></div> <div id="remaining"></div>
@ -41,14 +41,14 @@
// Historique supprimé // Historique supprimé
function updateRemaining() { function updateRemaining() {
document.getElementById('remaining').textContent = `Mots restants : ${remaining}`; document.getElementById('remaining').textContent = `Remaining words : ${remaining}`;
} }
async function startGame() { async function startGame() {
const firstWord = document.getElementById('firstWord').value; const firstWord = document.getElementById('firstWord').value;
const firstScore = document.getElementById('firstScore').value; const firstScore = document.getElementById('firstScore').value;
if (!firstWord || !firstScore) { if (!firstWord || !firstScore) {
alert('Remplis le mot et le score de départ'); alert('Add a word and a score');
return; return;
} }
document.getElementById('loading').style.display = ''; document.getElementById('loading').style.display = '';
@ -70,7 +70,7 @@
document.getElementById('game').style.display = ''; document.getElementById('game').style.display = '';
await nextWord(); await nextWord();
} catch (e) { } catch (e) {
alert('Erreur lors du chargement : ' + e); alert('Error while loading : ' + e);
} finally { } finally {
document.getElementById('loading').style.display = 'none'; document.getElementById('loading').style.display = 'none';
} }
@ -107,7 +107,7 @@
document.getElementById('submitScoreBtn').onclick = async function() { document.getElementById('submitScoreBtn').onclick = async function() {
const score = document.getElementById('scoreInput').value; const score = document.getElementById('scoreInput').value;
if (score === '') { if (score === '') {
document.getElementById('result').textContent = 'Veuillez entrer un score.'; document.getElementById('result').textContent = 'Please enter a score';
return; return;
} }
const resp = await fetch('/score', { const resp = await fetch('/score', {