mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-07 12:25:15 +00:00
Locale: factorized usage in I18n.
This commit is contained in:
@@ -18,8 +18,6 @@ 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
|
||||
|
||||
@@ -344,7 +342,7 @@ Loader {
|
||||
// Date below
|
||||
NText {
|
||||
text: {
|
||||
var lang = locale.name.split("_")[0]
|
||||
var lang = I18n.locale.name.split("_")[0]
|
||||
var formats = {
|
||||
"de": "dddd, d. MMMM",
|
||||
"es": "dddd, d 'de' MMMM",
|
||||
@@ -352,7 +350,7 @@ Loader {
|
||||
"pt": "dddd, d 'de' MMMM",
|
||||
"zh": "yyyy年M月d日 dddd"
|
||||
}
|
||||
return locale.toString(Time.date, formats[lang] || "dddd, MMMM d")
|
||||
return I18n.locale.toString(Time.date, formats[lang] || "dddd, MMMM d")
|
||||
}
|
||||
pointSize: Style.fontSizeXL
|
||||
font.weight: Font.Medium
|
||||
@@ -768,7 +766,7 @@ Loader {
|
||||
NText {
|
||||
text: {
|
||||
var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/"))
|
||||
return Qt.locale().toString(weatherDate, "ddd")
|
||||
return I18n.locale.toString(weatherDate, "ddd")
|
||||
}
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
|
||||
Reference in New Issue
Block a user