Skip to content

Commit 25bee1d

Browse files
dhhclaude
andauthored
Keep the calendar's day names in English (omacom#6988)
The calendar grid's header row and the week-start toggle label were the only text in the shell that followed the system locale, so a German desktop drew MO DI MI over an interface that is English everywhere else. Nothing chose that; they were the only two places reading day names off Qt.locale(). Take them from en_US instead. Where the week starts still follows the locale: that is a regional convention rather than a translation, and it stays overridable through weekStartDay. Dropping the trailing-period strip with it, since that existed only for the locales this no longer renders. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent ff4e92e commit 25bee1d

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎shell/plugins/panels/clock/Panel.qml‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ Panel {
6464
// convention. Clicking the grid's "W" heading writes the choice back to
6565
// shell.json.
6666
readonly property int weekStart: Model.normalizedWeekStart(setting("weekStartDay", null), Qt.locale().firstDayOfWeek)
67-
readonly property string nextWeekStartLabel: Qt.locale().dayName(Model.toggledWeekStart(weekStart), Locale.LongFormat)
67+
// The interface is English throughout, so day names are not taken from the
68+
// system locale. Where the week starts still is: that is a regional
69+
// convention rather than a translation, and it stays overridable above.
70+
readonly property var labelLocale: Qt.locale("en_US")
71+
readonly property string nextWeekStartLabel: labelLocale.dayName(Model.toggledWeekStart(weekStart), Locale.LongFormat)
6872
readonly property var weekdays: Model.weekdayOrder(weekStart)
6973
readonly property var weeks: Model.monthGrid(viewYear, viewMonth, weekStart, todayKey)
7074

@@ -213,10 +217,9 @@ Panel {
213217
setWeekStart(Model.toggledWeekStart(root.weekStart))
214218
}
215219

216-
// Locale short day names, trimmed of the trailing period some locales
217-
// carry ("man." -> "MAN") so the header row stays a clean band of caps.
220+
// English short day names, matching the rest of the interface.
218221
function weekdayLabel(weekday) {
219-
return String(Qt.locale().dayName(weekday, Locale.ShortFormat)).replace(/\.$/, "").toUpperCase()
222+
return String(labelLocale.dayName(weekday, Locale.ShortFormat)).toUpperCase()
220223
}
221224

222225
SystemClock {

0 commit comments

Comments
 (0)