From 03fd34eeb02a82c32d3de28ef436ac6d4a87a200 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 25 Mar 2025 21:48:02 +0200 Subject: [PATCH] feat(settings/i18n): dedicated restart button --- .../app/widgets/type_widgets/options/i18n/i18n.ts | 11 +++++++++-- src/public/translations/en/translation.json | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/public/app/widgets/type_widgets/options/i18n/i18n.ts b/src/public/app/widgets/type_widgets/options/i18n/i18n.ts index 65186524d..e4324393d 100644 --- a/src/public/app/widgets/type_widgets/options/i18n/i18n.ts +++ b/src/public/app/widgets/type_widgets/options/i18n/i18n.ts @@ -34,6 +34,10 @@ const TPL = ` + +
+ +
`; @@ -72,20 +80,19 @@ export default class LocalizationOptions extends OptionsWidget { this.$localeSelect.on("change", async () => { const newLocale = this.$localeSelect.val(); await server.put(`options/locale/${newLocale}`); - utils.reloadFrontendApp("locale change"); }); this.$formattingLocaleSelect = this.$widget.find(".formatting-locale-select"); this.$formattingLocaleSelect.on("change", async () => { const newLocale = this.$formattingLocaleSelect.val(); await server.put(`options/formattingLocale/${newLocale}`); - utils.restartDesktopApp(); }); this.$widget.find(`input[name="first-day-of-week"]`).on("change", () => { const firstDayOfWeek = String(this.$widget.find(`input[name="first-day-of-week"]:checked`).val()); this.updateOption("firstDayOfWeek", firstDayOfWeek); }); + this.$widget.find(".restart-app-button").on("click", utils.restartDesktopApp); } async optionsLoaded(options: OptionMap) { diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 2355f0fa7..998d9f2dc 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1243,7 +1243,7 @@ "first-day-of-the-week": "First day of the week", "sunday": "Sunday", "monday": "Monday", - "formatting-locale": "Formats (date, numbers)" + "formatting-locale": "Date & number format" }, "backup": { "automatic_backup": "Automatic backup",