mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-11-18 17:01:56 +08:00
fix(electron): wrong value for --lang
This commit is contained in:
parent
ab58671625
commit
90794fed88
@ -71,23 +71,23 @@ export default class LocalizationOptions extends OptionsWidget {
|
|||||||
async optionsLoaded(options: OptionMap) {
|
async optionsLoaded(options: OptionMap) {
|
||||||
const allLocales = getAvailableLocales();
|
const allLocales = getAvailableLocales();
|
||||||
|
|
||||||
function buildLocaleItem(locale: Locale) {
|
function buildLocaleItem(locale: Locale, value: string) {
|
||||||
return $("<option>")
|
return $("<option>")
|
||||||
.attr("value", locale.id)
|
.attr("value", value)
|
||||||
.text(locale.name)
|
.text(locale.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build list of UI locales.
|
// Build list of UI locales.
|
||||||
this.$localeSelect.empty();
|
this.$localeSelect.empty();
|
||||||
for (const locale of allLocales.filter(l => !l.contentOnly)) {
|
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);
|
this.$localeSelect.val(options.locale);
|
||||||
|
|
||||||
// Build list of Electron locales.
|
// Build list of Electron locales.
|
||||||
this.$formattingLocaleSelect.empty();
|
this.$formattingLocaleSelect.empty();
|
||||||
for (const locale of allLocales.filter(l => l.electronLocale)) {
|
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);
|
this.$formattingLocaleSelect.val(options.formattingLocale);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user