Reset the chat history when resetting the game
authorRaphaël Jakse <raphael.trivabble@jakse.fr>
Sat, 6 Dec 2025 15:06:53 +0000 (16:06 +0100)
committerRaphaël Jakse <raphael.trivabble@jakse.fr>
Sat, 6 Dec 2025 15:18:31 +0000 (16:18 +0100)
Suggested by a user.

l10n/po/fr/trivabble.po
l10n/pot/trivabble.pot
public/trivabble.js
server/trivabble-server.js

index 4306a19c899e3a9b860601e8fbbbf5ff1773305b..5cfc7cc5615d85da0b8517c3cc545a1e15fd82e8 100644 (file)
@@ -28,8 +28,8 @@ msgstr "Pour changer de nom, saisissez-en un nouveau. Vous pouvez continuer à u
 msgid  "You cannot take another tile: your rack is full."
 msgstr "Vous ne pouvez pas tirer de pièce : votre chevalet est complet."
 
-msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)?"
-msgstr "Êtes-vous sûr·e de vouloir remettre toutes les lettres du jeu dans le sac (en vue de jouer une nouvelle partie) ?"
+msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)? This will also clear the chat history."
+msgstr "Êtes-vous sûr·e de vouloir remettre toutes les lettres du jeu dans le sac (en vue de jouer une nouvelle partie) ? Cela remettra également l'historique du chat à zéro."
 
 msgid  "Are you sure you want to put all your tiles back in the bag?"
 msgstr "Êtes-vous sûr·e de vouloir remettre toutes vos lettres dans le sac ?"
index 98d1812dde5b85628f72593d0cbe9724de302571..2cb91f9feedb3cf5115b8bb8bb73b79597ade28a 100644 (file)
@@ -30,7 +30,7 @@ msgstr ""
 msgid  "You cannot take another tile: your rack is full."
 msgstr ""
 
-msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)?"
+msgid  "Are you sure you want to put all the tiles back in the bag (in order to play another game)? This will also clear the chat history."
 msgstr ""
 
 msgid  "Are you sure you want to put all your tiles back in the bag?"
index ae16d6208b9600369a4f78b6c44a3c2a42a3ea4c..bc99c954549ca35990bd6a78cb58c4869ae9d1e5 100644 (file)
 
                 lastPlayer = null;
                 currentTileOwner = {};
+                chatMessages.textContent = "";
                 break;
 
             case "moveLetter":
 
     function clearGame() {
         myConfirm(
-            _("Are you sure you want to put all the tiles back in the bag (in order to play another game)?"),
+            _("Are you sure you want to put all the tiles back in the bag (in order to play another game)? This will also clear the chat history."),
             function () {
                 sendCmds([{cmd: "resetGame"}]);
             }
index ec1abae81b45e0d9eefdb3f86aaf436e967ba8d6..3216cbfb316f7f331c5cbb832dfe5edfac6eed54 100644 (file)
@@ -498,7 +498,7 @@ Game.prototype.bagPushLetter = function (letter, player) {
 };
 
 Game.prototype.reset = function (player) {
-    this.init(this.lang, this.label, this.factor, this.checkFirstWord, this.freezePlayedTiles, this.chatHistory);
+    this.init(this.lang, this.label, this.factor, this.checkFirstWord, this.freezePlayedTiles, []);
     this.pendingEvents.push({
         player: player,
         action: "reset",