From 7cebd2bf952307144853fa2eb1e79eaa5fbc5c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ot=C3=A1vio=20Silva?= Date: Thu, 4 Jul 2024 16:38:57 -0300 Subject: [PATCH] event-widget: Use "On..." in tooltip when location is a meeting service In the tooltip, the event location always has the preposition "At ...". This changes it to "On ..." when the location is a known meeting service. --- src/gui/gcal-event-widget.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/gui/gcal-event-widget.c b/src/gui/gcal-event-widget.c index d2584deb..3870c507 100644 --- a/src/gui/gcal-event-widget.c +++ b/src/gui/gcal-event-widget.c @@ -365,11 +365,13 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, if (service_name) { - g_string_append (string, service_name); + /* Translators: %s is the meeting service name for the event (e.g. "Google Meet") */ + g_string_append_printf (string, _("\n\nOn %s"), service_name); } else { - g_string_append (string, location); + /* Translators: %s is a URL informed as the location of the event */ + g_string_append_printf (string, _("\n\nAt %s"), location); if (g_utf8_strlen (location, -1) > LOCATION_MAX_LEN) { @@ -380,13 +382,13 @@ gcal_event_widget_set_event_tooltip (GcalEventWidget *self, } else { - g_string_append (string, location); + /* Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") */ + g_string_append_printf (string, _("\n\nAt %s"), location); } escaped_location = g_markup_escape_text (string->str, -1); - /* Translators: %s is the location of the event (e.g. "Downtown, 3rd Avenue") */ - g_string_append_printf (tooltip_mesg, _("\n\nAt %s"), escaped_location); + g_string_append (tooltip_mesg, escaped_location); } description_len = g_utf8_strlen (gcal_event_get_description (event), -1);