From 9f109a7f3e74337ea77da608d6a2acdb624dfcdd Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 15 Aug 2026 17:27:35 +0200 Subject: [PATCH] Format the whole speed test dial for the locale (#6994) The dial already grouped its digits for the locale above 10, but below 10 it went through toFixed, which hardcodes a dot. A German desktop therefore read 9.5 and 1.235 off the same dial, switching decimal convention halfway up the scale. Send both branches through the locale. A reading is a measurement rather than interface text, so its separators follow the system's number conventions even though the interface itself stays English. English output is unchanged. Co-authored-by: Claude Opus 5 --- shell/Ui/SpeedTestOverlay.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shell/Ui/SpeedTestOverlay.qml b/shell/Ui/SpeedTestOverlay.qml index 401e54ab..1216f348 100644 --- a/shell/Ui/SpeedTestOverlay.qml +++ b/shell/Ui/SpeedTestOverlay.qml @@ -369,7 +369,13 @@ PanelWindow { Text { anchors.horizontalCenter: parent.horizontalCenter - text: dial.reading < 10 ? dial.reading.toFixed(1) : Math.round(dial.reading).toLocaleString(Qt.locale(), 'f', 0) + // Both branches go through the locale: a reading is a measurement, so + // its separators follow the system's number conventions rather than the + // interface language. toFixed would have hardcoded a dot below 10 while + // everything above it was already grouped for the locale. + text: dial.reading < 10 + ? dial.reading.toLocaleString(Qt.locale(), 'f', 1) + : Math.round(dial.reading).toLocaleString(Qt.locale(), 'f', 0) color: root.onScrim font.family: root.fontFamily font.pixelSize: Style.font.display