fix(electron): wrong value for --lang

This commit is contained in:
Elian Doran 2025-03-25 20:26:21 +02:00
parent ab58671625
commit 90794fed88
No known key found for this signature in database

View File

@ -71,23 +71,23 @@ export default class LocalizationOptions extends OptionsWidget {
async optionsLoaded(options: OptionMap) {
const allLocales = getAvailableLocales();
function buildLocaleItem(locale: Locale) {
function buildLocaleItem(locale: Locale, value: string) {
return $("<option>")
.attr("value", locale.id)
.attr("value", value)
.text(locale.name)
}
// Build list of UI locales.
this.$localeSelect.empty();
for (const locale of allLocales.filter(l => !l.contentOnly)) {
this.$localeSelect.append(buildLocaleItem(locale));
this.$localeSelect.append(buildLocaleItem(locale, locale.id));
}
this.$localeSelect.val(options.locale);
// Build list of Electron locales.
this.$formattingLocaleSelect.empty();
for (const locale of allLocales.filter(l => l.electronLocale)) {
this.$formattingLocaleSelect.append(buildLocaleItem(locale));
this.$formattingLocaleSelect.append(buildLocaleItem(locale, locale.electronLocale as string));
}
this.$formattingLocaleSelect.val(options.formattingLocale);