make custom board an experimental feature
authorLaurent Mazet <mazet@softndesign.org>
Mon, 26 Apr 2021 19:59:18 +0000 (21:59 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Mon, 26 Apr 2021 19:59:18 +0000 (21:59 +0200)
l10n/po/fr/trivabble.po
l10n/pot/trivabble.pot
public/config.js.sample
public/trivabble.js

index acea925f5c94fb8cc4438d1675eb50a604cc74a5..c1593e52305f6bca3b6afab3fcb13a71a9ad23e7 100644 (file)
@@ -285,3 +285,6 @@ msgstr "Êtes-vous sûr·e de vouloir de changer le type du plateau à {0} ? Cel
 
 msgid  "Can't find board '{0}'. Change board or start a new game."
 msgstr "Impossible de trouver le plateau de type '{0}'. Changez de type de plateau ou démarrez une nouvelle partie."
+
+msgid  "Caution, this feature is experimental; any feedback will be appreciated"
+msgstr "Attention, cette fonctionnalité est expérimentale ; tout commentaire sera grandement apprécié"
index 2620d5c6f42866cd17188a95fca63dc7af028207..a45b488fff4e7d4e73faf6a65a89b62fdd831db8 100644 (file)
@@ -290,3 +290,6 @@ msgstr ""
 
 msgid  "Can't find board '{0}'. Change board or start a new game."
 msgstr ""
+
+msgid  "Caution, this feature is experimental; any feedback will be appreciated"
+msgstr ""
index 601e50332ff3749c0d8d8d01e7c07c90e868533d..c95d2616511857302fc141612f7a7657f615453a 100644 (file)
@@ -53,6 +53,9 @@ window.TrivabbleConf = {
     // Cell captions. Could be "clip", "dots", "none" or "short"
     //CELL_CAPTIONS: "dots",
 
+    // Enable custom board definitions
+    //ENABLE_CUSTOM_BOARD: false,
+
     // I don't like trailing commas, here is a nice message for you reading this file :-)
     HAVE_FUN: true
 };
index d333b6984c42294be96fd16671a4546d63ebbd82..d0d4251fc8478c0c735e6f83bf4e3252be93537f 100644 (file)
@@ -66,6 +66,7 @@
     setConf("SCORE_LAST_PLAYER",     true);
     setConf("ENABLE_TIMER",          false);
     setConf("CELL_CAPTIONS",         "dots"); // "clip", "dots", "none", "short"
+    setConf("ENABLE_CUSTOM_BOARD",   false);
 
     function isSetting(key) {
         return Object.prototype.hasOwnProperty.call(Conf, key) ||
                             ? format(_("You changed the board to {0} for language {1}"), newLabel, newLang)
                             : format(_("{0} changed the board to {1} for language {2}"), msg.sender, newLabel, newLang)
                     );
+                    if (newLabel !== "15x15-7") {
+                        infoMessage(_("Caution, this feature is experimental; any feedback will be appreciated"));
+                    }
                     break;
                 }
 
             return;
         }
 
-        if (Object.keys(BoardList).length > 1) {
+        if (getSetting("ENABLE_CUSTOM_BOARD") && (Object.keys(BoardList).length > 1)) {
             boardLabelSelect.textContent = "";
 
             for (const key of Object.keys(BoardList)) {