Locale: factorized usage in I18n.

This commit is contained in:
ItsLemmy
2025-10-30 17:43:35 -04:00
parent e1d39f3bbc
commit 29ad654a58
9 changed files with 19 additions and 28 deletions
+1 -3
View File
@@ -9,8 +9,6 @@ import qs.Widgets
NBox {
id: root
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
property int forecastDays: 7
readonly property bool weatherReady: Settings.data.location.weatherEnabled && (LocationService.data.weather !== null)
@@ -104,7 +102,7 @@ NBox {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
text: {
var weatherDate = new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/"))
return locale.toString(weatherDate, "ddd")
return I18n.locale.toString(weatherDate, "ddd")
}
color: Color.mOnSurface
}