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
+4 -2
View File
@@ -18,6 +18,8 @@ Loader {
id: lockScreen
active: false
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
// Track if triggered via deprecated IPC call
property bool triggeredViaDeprecatedCall: false
@@ -342,7 +344,7 @@ Loader {
// Date below
NText {
text: {
var lang = Qt.locale().name.split("_")[0]
var lang = locale.name.split("_")[0]
var formats = {
"de": "dddd, d. MMMM",
"es": "dddd, d 'de' MMMM",
@@ -350,7 +352,7 @@ Loader {
"pt": "dddd, d 'de' MMMM",
"zh": "yyyy年M月d日 dddd"
}
return Qt.locale().toString(Time.date, formats[lang] || "dddd, MMMM d")
return locale.toString(Time.date, formats[lang] || "dddd, MMMM d")
}
pointSize: Style.fontSizeXL
font.weight: Font.Medium