Skip to content

Commit 32eef1d

Browse files
authored
Merge pull request #1304 from diesphink/no_translation_on_locale
Option to keep or not the textual translations
2 parents 217fa04 + 58a9b19 commit 32eef1d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

apps/locale/locale.html

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
<select id="languages" class="form-select">
1111
</select>
1212
</div>
13+
<div class="form-group">
14+
<input id="translations" type="checkbox" checked /> <label for="translations">Mark this option if you want translations for common text like "Yes", "No", "On", "Off".</label>
15+
</div>
1316
<p>Then click <button id="upload" class="btn btn-primary">Upload</button></p>
1417

1518
<script src="../../core/lib/customize.js"></script>
@@ -106,12 +109,18 @@
106109
const lang = languageSelector.options[languageSelector.selectedIndex].value;
107110
console.log(`Language ${lang}`);
108111

112+
const translations = document.getElementById('translations').checked;
113+
console.log(`Translations: ${translations}`);
114+
109115
const locale = locales[lang];
110116
if (!locale) {
111117
alert(`Language ${lang} not found!`);
112118
return;
113119
}
114120

121+
if (!translations)
122+
locale.trans = null;
123+
115124
const codePageName = "ISO8859-1";
116125
if (locale.codePage)
117126
codePageName = locale.codePage;

0 commit comments

Comments
 (0)