Remplace le terme block par partie

This commit is contained in:
2026-04-12 14:37:32 +02:00
parent 7d0be5baa5
commit a90b1b6d8a
7 changed files with 69 additions and 69 deletions

54
app.js
View File

@@ -12,24 +12,24 @@ const PRESETS = {
fast: {
label: "FAST",
quota: 6,
description: "6 coups par joueur et par block.",
description: "6 coups par joueur et par partie.",
},
freeze: {
label: "FREEZE",
quota: 8,
description: "8 coups par joueur et par block.",
description: "8 coups par joueur et par partie.",
},
masters: {
label: "MASTERS",
quota: 10,
description: "10 coups par joueur et par block.",
description: "10 coups par joueur et par partie.",
},
};
const MODES = {
twice: {
label: "ChessCubing Twice",
subtitle: "Le gagnant du cube ouvre le block suivant.",
subtitle: "Le gagnant du cube ouvre la partie suivante.",
},
time: {
label: "ChessCubing Time",
@@ -98,12 +98,12 @@ function initSetupPage() {
const timeImpact =
mode === "time"
? "Chronos cumules de 10 minutes, ajustes apres chaque phase cube avec plafond de 120 s pris en compte."
: "Le gagnant du cube commence le block suivant, avec double coup V2 possible.";
: "Le gagnant du cube commence la partie suivante, avec double coup V2 possible.";
summary.innerHTML = `
<strong>${MODES[mode].label}</strong>
<span>${PRESETS[preset].description}</span>
<span>Temps configures : block ${formatClock(blockDurationMs)}, coup ${formatClock(moveLimitMs)}.</span>
<span>Temps configures : partie ${formatClock(blockDurationMs)}, coup ${formatClock(moveLimitMs)}.</span>
<span>${timeImpact}</span>
<span>Quota actif : ${quota} coups par joueur.</span>
`;
@@ -263,7 +263,7 @@ function initChronoPage() {
return;
}
requestBlockClosure(match, "Cloture manuelle du block demandee par l'arbitre.");
requestBlockClosure(match, "Cloture manuelle de la partie demandee par l'arbitre.");
dirty = true;
render();
});
@@ -392,10 +392,10 @@ function initChronoPage() {
}
if (!match.running) {
button.textContent = "Block en pause";
button.textContent = "Partie en pause";
button.disabled = true;
hint.textContent = active
? "Le block n'a pas encore demarre ou a ete mis en pause."
? "La partie n'a pas encore demarre ou a ete mise en pause."
: `${playerName(match, match.currentTurn)} reprendra au demarrage.`;
return;
}
@@ -438,7 +438,7 @@ function initChronoPage() {
}
refs.title.textContent = match.config.matchLabel;
refs.subtitle.textContent = `Block ${match.blockNumber} - ${MODES[match.config.mode].label} - ${renderModeContext(match)}`;
refs.subtitle.textContent = `Partie ${match.blockNumber} - ${MODES[match.config.mode].label} - ${renderModeContext(match)}`;
refs.blockTimer.textContent = formatClock(match.blockRemainingMs);
refs.moveTimer.textContent = formatClock(match.moveRemainingMs);
refs.arbiterTimeoutButton.textContent = `Depassement ${formatClock(getMoveLimitMs(match))}`;
@@ -455,20 +455,20 @@ function initChronoPage() {
refs.centerLabel.textContent = "Trait";
refs.centerValue.textContent = playerName(match, match.currentTurn);
refs.spineLabel.textContent = "Chrono en cours";
refs.spineHeadline.textContent = `Block ${match.blockNumber} actif`;
refs.spineHeadline.textContent = `Partie ${match.blockNumber} active`;
refs.spineText.textContent =
"Chaque joueur tape sur sa grande zone quand son coup est termine. La page cube s'ouvrira automatiquement a la fin de la phase chess.";
refs.primaryButton.textContent = "Pause arbitre";
refs.arbiterStatus.textContent = `Block en cours. Joueur au trait : ${playerName(match, match.currentTurn)}.`;
refs.arbiterStatus.textContent = `Partie en cours. Joueur au trait : ${playerName(match, match.currentTurn)}.`;
} else {
refs.centerLabel.textContent = "Trait";
refs.centerValue.textContent = playerName(match, match.currentTurn);
refs.spineLabel.textContent = "Pret";
refs.spineHeadline.textContent = `Block ${match.blockNumber}`;
refs.spineHeadline.textContent = `Partie ${match.blockNumber}`;
refs.spineText.textContent =
"Demarrez le block, puis laissez uniquement les deux grandes zones aux joueurs. La page cube prendra automatiquement le relais.";
refs.primaryButton.textContent = "Demarrer le block";
refs.arbiterStatus.textContent = `Block pret. ${playerName(match, match.currentTurn)} commencera.`;
"Demarrez la partie, puis laissez uniquement les deux grandes zones aux joueurs. La page cube prendra automatiquement le relais.";
refs.primaryButton.textContent = "Demarrer la partie";
refs.arbiterStatus.textContent = `Partie prete. ${playerName(match, match.currentTurn)} commencera.`;
}
refs.arbiterCloseBlockButton.textContent = "Passer au cube";
@@ -666,7 +666,7 @@ function initCubePage() {
function render() {
refs.title.textContent = match.cube.number ? `Cube n${match.cube.number}` : "Phase cube";
refs.subtitle.textContent = `Block ${match.blockNumber} - ${MODES[match.config.mode].label} - ${renderModeContext(match)}`;
refs.subtitle.textContent = `Partie ${match.blockNumber} - ${MODES[match.config.mode].label} - ${renderModeContext(match)}`;
refs.blockLabel.textContent = `${match.blockNumber}`;
refs.elapsed.textContent = renderCubeElapsed(match);
@@ -696,7 +696,7 @@ function initCubePage() {
refs.centerValue.textContent = "Phase cube complete";
refs.spineLabel.textContent = "Suite";
refs.spineHeadline.textContent = "Ouvrir la page chrono";
refs.spineText.textContent = "Appliquer le resultat du cube pour preparer le block suivant.";
refs.spineText.textContent = "Appliquer le resultat du cube pour preparer la partie suivante.";
refs.primaryButton.textContent = "Appliquer et ouvrir la page chrono";
refs.helpStatus.textContent = refs.spineText.textContent;
} else if (match.cube.running) {
@@ -806,9 +806,9 @@ function createMatch(config) {
logEvent(
newMatch,
`Match cree en mode ${MODES[config.mode].label}, cadence ${PRESETS[config.preset].label}, block ${formatClock(config.blockDurationMs)} et coup ${formatClock(config.moveLimitMs)}.`,
`Match cree en mode ${MODES[config.mode].label}, cadence ${PRESETS[config.preset].label}, partie ${formatClock(config.blockDurationMs)} et coup ${formatClock(config.moveLimitMs)}.`,
);
logEvent(newMatch, "Les Blancs commencent le block 1.");
logEvent(newMatch, "Les Blancs commencent la partie 1.");
return newMatch;
}
@@ -945,7 +945,7 @@ function syncRunningState(storedMatch) {
if (storedMatch.blockRemainingMs === 0) {
requestBlockClosure(
storedMatch,
`Le temps de block ${formatClock(getBlockDurationMs(storedMatch))} est ecoule.`,
`Le temps de partie ${formatClock(getBlockDurationMs(storedMatch))} est ecoule.`,
);
} else if (storedMatch.moveRemainingMs === 0) {
registerMoveTimeout(storedMatch, true);
@@ -966,8 +966,8 @@ function startBlock(storedMatch) {
logEvent(
storedMatch,
storedMatch.blockNumber === 1 && storedMatch.moves.white === 0 && storedMatch.moves.black === 0
? "Block 1 demarre."
: `Block ${storedMatch.blockNumber} relance.`,
? "Partie 1 demarre."
: `Partie ${storedMatch.blockNumber} relance.`,
);
}
@@ -978,7 +978,7 @@ function pauseBlock(storedMatch) {
storedMatch.running = false;
storedMatch.lastTickAt = null;
logEvent(storedMatch, `Block ${storedMatch.blockNumber} mis en pause.`);
logEvent(storedMatch, `Partie ${storedMatch.blockNumber} mise en pause.`);
}
function requestBlockClosure(storedMatch, reason) {
@@ -1105,7 +1105,7 @@ function applyCubeOutcome(storedMatch) {
function prepareNextTwiceBlock(storedMatch, winner) {
const hadDouble = storedMatch.lastMover !== winner && storedMatch.lastMover !== null;
logEvent(storedMatch, `${playerName(storedMatch, winner)} gagne la phase cube et ouvrira le block suivant.`);
logEvent(storedMatch, `${playerName(storedMatch, winner)} gagne la phase cube et ouvrira la partie suivante.`);
storedMatch.blockNumber += 1;
storedMatch.phase = "block";
@@ -1161,7 +1161,7 @@ function prepareNextTimeBlock(storedMatch) {
storedMatch.cube.number = null;
logEvent(
storedMatch,
`Block ${storedMatch.blockNumber} pret. Le trait est conserve : ${playerName(
`Partie ${storedMatch.blockNumber} prete. Le trait est conserve : ${playerName(
storedMatch,
storedMatch.currentTurn,
)} reprend.`,
@@ -1333,7 +1333,7 @@ function renderModeContext(storedMatch) {
return "Deuxieme coup du double en attente";
}
return "Le gagnant du cube ouvrira le prochain block";
return "Le gagnant du cube ouvrira la prochaine partie";
}
function renderLastCube(storedMatch, color) {