From 25bee1d2a3dae6780eae724340a360bc357276c8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Aug 2026 17:21:26 +0200 Subject: [PATCH] Keep the calendar's day names in English (#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 --- shell/plugins/panels/clock/Panel.qml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/shell/plugins/panels/clock/Panel.qml b/shell/plugins/panels/clock/Panel.qml index fd9c4477..f0dff3ae 100644 --- a/shell/plugins/panels/clock/Panel.qml +++ b/shell/plugins/panels/clock/Panel.qml @@ -64,7 +64,11 @@ Panel { // convention. Clicking the grid's "W" heading writes the choice back to // shell.json. readonly property int weekStart: Model.normalizedWeekStart(setting("weekStartDay", null), Qt.locale().firstDayOfWeek) - readonly property string nextWeekStartLabel: Qt.locale().dayName(Model.toggledWeekStart(weekStart), Locale.LongFormat) + // The interface is English throughout, so day names are not taken from the + // system locale. Where the week starts still is: that is a regional + // convention rather than a translation, and it stays overridable above. + readonly property var labelLocale: Qt.locale("en_US") + readonly property string nextWeekStartLabel: labelLocale.dayName(Model.toggledWeekStart(weekStart), Locale.LongFormat) readonly property var weekdays: Model.weekdayOrder(weekStart) readonly property var weeks: Model.monthGrid(viewYear, viewMonth, weekStart, todayKey) @@ -213,10 +217,9 @@ Panel { setWeekStart(Model.toggledWeekStart(root.weekStart)) } - // Locale short day names, trimmed of the trailing period some locales - // carry ("man." -> "MAN") so the header row stays a clean band of caps. + // English short day names, matching the rest of the interface. function weekdayLabel(weekday) { - return String(Qt.locale().dayName(weekday, Locale.ShortFormat)).replace(/\.$/, "").toUpperCase() + return String(labelLocale.dayName(weekday, Locale.ShortFormat)).toUpperCase() } SystemClock {