I've made this into an option on Languages:
diff --git a/apps/locale/locale.html b/apps/locale/locale.html index 90a2e8d4..fa857d9f 100644 --- a/apps/locale/locale.html +++ b/apps/locale/locale.html @@ -10,6 +10,9 @@ <select id="languages" class="form-select"> </select> </div> + <div class="form-group"> + <input id="translations" type="checkbox" checked /> <label for="translations">Mark this option if you want translations for commont text like "Yes", "No", "On", "Off".</label> + </div> <p>Then click <button id="upload" class="btn btn-primary">Upload</button></p> <script src="../../core/lib/customize.js"></script> @@ -106,12 +109,18 @@ exports = { name : "en_GB", currencySym:"£", const lang = languageSelector.options[languageSelector.selectedIndex].value; console.log(`Language ${lang}`); + const translations = document.getElementById('translations').checked; + console.log(`Translations: ${translations}`); + const locale = locales[lang]; if (!locale) { alert(`Language ${lang} not found!`); return; } + if (!translations) + locale.trans = null; + const codePageName = "ISO8859-1"; if (locale.codePage) codePageName = locale.codePage;
1 Attachment
@diego started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I've made this into an option on Languages:
1 Attachment