From e470ecfc253da5a36e91c6449d2422cdd21d5b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Fortin=20Tam?= Date: Tue, 18 Nov 2025 13:34:29 -0500 Subject: [PATCH] quick-add-popover: Use semantic typographic wrapping of time ranges Atomically maintain time ranges on the same line when possible. This is done using invisible non-breaking whitespace characters. When selecting a range of time in the week view's timetable, this ensures eye-pleasing, natural-looking typography. Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1503 Part-of: --- src/gui/gcal-quick-add-popover.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c index 71efe59a..a514c36e 100644 --- a/src/gui/gcal-quick-add-popover.c +++ b/src/gui/gcal-quick-add-popover.c @@ -421,8 +421,9 @@ update_header (GcalQuickAddPopover *self) } else { - /* Translators: %1$s is the event name, %2$s is the start hour, and %3$s is the end hour */ - title_date = g_strdup_printf (_("%1$s, %2$s – %3$s"), + /* Translators: %1$s is the event name, %2$s is the start hour, and %3$s is the end hour. + * To avoid spurious line wrapping, use non-breaking space characters around the en dash. */ + title_date = g_strdup_printf (_("%1$s, %2$s – %3$s"), event_date_name, start_hour, end_hour);