Refactor: Improve i18n support and fix multiplication steps layout
Some checks failed
continuous-integration/drone/push Build is failing

- Integrate i18n translations for difficulty descriptions
- Fix intermediate steps alignment in long multiplication display
- Simplify spacing calculations for better layout consistency
- Update translation files for all supported languages (en, es, el, sv)
This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-11-25 17:46:30 +01:00
parent 382b0b235c
commit b907866c85
7 changed files with 23 additions and 31 deletions

View file

@ -448,8 +448,8 @@ function handleSubmitAnswer() {
showFeedback('🎉 Correct! +1 point', 'correct');
updateScore();
// Check if reached 20 points
if (gameState.points >= 20) {
// Check if reached 10 points
if (gameState.points >= 10) {
showVictoryModal();
return;
}
@ -502,7 +502,7 @@ function clearFeedback() {
* Update score display
*/
function updateScore() {
pointsScoreDisplay.textContent = `${gameState.points}/20`;
pointsScoreDisplay.textContent = `${gameState.points}/10`;
}
/**
@ -643,7 +643,7 @@ function updateUIText() {
modalTitle.textContent = i18n.t('congratulations');
}
if (modalText) {
modalText.textContent = i18n.t('youReached20Points');
modalText.textContent = i18n.t('youReached10Points');
}
if (playAgainButton) {
playAgainButton.textContent = i18n.t('playAgain');