Option to keep or not the textual translations
parent
3606267aec
commit
4c8c1a6d2f
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue