Locale: fixed all Qt.locale calls to respect the user selected locale.

This commit is contained in:
ItsLemmy
2025-10-30 17:20:54 -04:00
parent bc9fe06fd8
commit e1d39f3bbc
8 changed files with 562 additions and 551 deletions
+5 -3
View File
@@ -9,6 +9,8 @@ ColumnLayout {
id: root
spacing: Style.marginL
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
NHeader {
label: I18n.tr("settings.location.location.section.label")
description: I18n.tr("settings.location.location.section.description")
@@ -135,15 +137,15 @@ ColumnLayout {
"name": I18n.tr("settings.location.date-time.first-day-of-week.automatic")
}, {
"key": "6",
"name": Qt.locale().dayName(6, Locale.LongFormat)
"name": locale.dayName(6, Locale.LongFormat)
}, // Saturday
{
"key": "0",
"name": Qt.locale().dayName(0, Locale.LongFormat)
"name": locale.dayName(0, Locale.LongFormat)
}, // Sunday
{
"key": "1",
"name": Qt.locale().dayName(1, Locale.LongFormat)
"name": locale.dayName(1, Locale.LongFormat)
} // Monday
]
onSelected: key => Settings.data.location.firstDayOfWeek = parseInt(key)