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