Remove the "enable spell checker" checkbox

I don't really see a use case requiring disabling the spell checker if available.
People can just not use it. The dictionary is downloaded on first use anyway.
We do want people to discover the feature with the presence of the related button
by default, however.
This commit is contained in:
Raphaël Jakse 2020-10-05 20:54:33 +02:00
parent 2fd1b2672c
commit f77cf3197e
4 changed files with 9 additions and 26 deletions

View File

@ -190,9 +190,6 @@ msgstr "Dictionnaire incorrect."
msgid "Can't load dictionary file."
msgstr "Impossible de charger le dictionnaire"
msgid "Enable spell checker"
msgstr "Activer le vérificateur orthographique"
msgid "Spell checking requires Trivabble to download a dictionary. Do you confirm?"
msgstr "La vérification orthographique nécessite que Trivabble télécharge un dictionnaire. Confirmez-vous ?"

View File

@ -190,9 +190,6 @@ msgstr ""
msgid "Can't load dictionary file."
msgstr ""
msgid "Enable spell checker"
msgstr ""
msgid "Spell checking requires Trivabble to download a dictionary. Do you confirm?"
msgstr ""

View File

@ -57,7 +57,6 @@
<div id="prefs">
<p><label><input type="checkbox" id="tiles-sound" /><span data-l10n="text-content">Sound of the tiles</span></label></p>
<p><label><input type="checkbox" id="msg-sound" /><span data-l10n="text-content">Sound of messages</span></label></p>
<p id="enable-spell-checker-outer" hidden="true"><label><input type="checkbox" id="enable-spell-checker" /> <span data-l10n="text-content">Enable spell checker</span></label></p>
<p><label><span data-l10n="text-content">(fast)</span><input type="range" min="0" max="0" id="double-tap-duration"/><span data-l10n="text-content">(slow)</span><br/><span data-l10n="text-content">Double tap duration</span></label></p>
<p><label><span data-l10n="text-content">(fast)</span><input type="range" min="0" max="0" id="flash-light-duration"/><span data-l10n="text-content">(slow)</span><br/><span data-l10n="text-content">Flash light duration</span></label></p>
<p id="flash-light-color-p"><label><input type="color" size="6" id="flash-light-color" /> <span data-l10n="text-content">Flash light color</span></label></p>

View File

@ -319,11 +319,6 @@
file.send();
}
function spellCheckerSettingChecked() {
setSetting("spellCheckerEnabled", document.getElementById("enable-spell-checker").checked);
initSpellChecker();
}
function removeElem(elem) {
elem.parentNode.removeChild(elem);
}
@ -1998,19 +1993,11 @@
function initSpellChecker() {
if (getSetting("ENABLE_SPELL_CHECKER")) {
document.getElementById("enable-spell-checker-outer").hidden = false;
}
document.getElementById("enable-spell-checker").onclick = spellCheckerSettingChecked;
if (!getSetting("ENABLE_SPELL_CHECKER") || !getSetting("spellCheckerEnabled")) {
document.getElementById("check-spelling").hidden = true;
document.getElementById("enable-spell-checker").checked = false;
document.getElementById("info-spell-checking").hidden = true;
} else {
document.getElementById("check-spelling").hidden = false;
document.getElementById("info-spell-checking").hidden = false;
document.getElementById("enable-spell-checker").checked = true;
} else {
document.getElementById("check-spelling").hidden = true;
document.getElementById("info-spell-checking").hidden = true;
}
}
@ -2161,8 +2148,11 @@
}
function showSettings() {
const modal = document.querySelector(".modal");
modal.classList.toggle("show-modal");
document.querySelector(".modal").classList.add("show-modal");
}
function hideSettings() {
document.querySelector(".modal").classList.remove("show-modal");
}
function initGlobals() {
@ -2187,7 +2177,7 @@
document.getElementById("show-rack").onclick = showRack;
document.getElementById("check-spelling").onclick = checkSpellingClicked;
document.getElementById("btn-settings").onclick = showSettings;
document.getElementById("btn-settings-close").onclick = showSettings;
document.getElementById("btn-settings-close").onclick = hideSettings;
document.getElementById("next-help-msg").onclick = nextHelpMessage;
document.body.addEventListener("keydown", function (e) {
if (e.key === 'Escape') {