From 0097ab9794649b78a3da52b25cd20c40359e02cf Mon Sep 17 00:00:00 2001 From: Titouan Real Date: Thu, 6 Feb 2025 16:49:10 +0100 Subject: [PATCH] Mark date formats as translatable Fix #1204 --- src/gui/gcal-event-widget.c | 8 +++++++- src/gui/views/gcal-agenda-view.c | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gui/gcal-event-widget.c b/src/gui/gcal-event-widget.c index 970a3e8a..9ae122ff 100644 --- a/src/gui/gcal-event-widget.c +++ b/src/gui/gcal-event-widget.c @@ -438,7 +438,13 @@ gcal_event_widget_update_timestamp (GcalEventWidget *self) time = g_date_time_to_local (gcal_event_get_date_end (self->event)); if (gcal_event_get_all_day (self->event) || gcal_event_is_multiday (self->event)) - timestamp_str = g_date_time_format (time, "%a %B %e"); + /* + * Translators: %A is the abbreviated day name, %B is the month name + * and %d is the day of the month as a number between 0 and 31. + * More formats can be found on the doc: + * https://docs.gtk.org/glib/method.DateTime.format.html + */ + timestamp_str = g_date_time_format (time, _("%a %B %d")); else if (gcal_context_get_time_format (self->context) == GCAL_TIME_FORMAT_24H) timestamp_str = g_date_time_format (time, "%R"); else diff --git a/src/gui/views/gcal-agenda-view.c b/src/gui/views/gcal-agenda-view.c index 059a322a..33fed72a 100644 --- a/src/gui/views/gcal-agenda-view.c +++ b/src/gui/views/gcal-agenda-view.c @@ -200,7 +200,13 @@ new_date_header_string (GDateTime *date) else if (gcal_date_time_compare_date (date, yesterday) == 0) return g_strdup (_("Yesterday")); else - return g_date_time_format (date, "%A %B %e"); + /* + * Translators: %A is the abbreviated day name, %B is the month name + * and %d is the day of the month as a number between 0 and 31. + * More formats can be found on the doc: + * https://docs.gtk.org/glib/method.DateTime.format.html + */ + return g_date_time_format (date, _("%A %B %d")); }