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
+7 -6
View File
@@ -5,16 +5,17 @@ import qs.Commons
Rectangle {
id: root
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
property date sampleDate: new Date() // Dec 25, 2023, 2:30:45.123 PM
signal tokenClicked(string token)
color: Color.mSurface
border.color: Color.mOutline
border.width: Style.borderS
radius: Style.radiusM
property date sampleDate: new Date() // Dec 25, 2023, 2:30:45.123 PM
// Signal emitted when a token is clicked
signal tokenClicked(string token)
ColumnLayout {
id: column
anchors.fill: parent
@@ -312,7 +313,7 @@ Rectangle {
NText {
anchors.centerIn: parent
text: Qt.locale().toString(root.sampleDate, modelData.token)
text: locale.toString(root.sampleDate, modelData.token)
color: tokenMouseArea.containsMouse ? Color.mOnPrimary : Color.mSurfaceVariant
pointSize: Style.fontSizeS