Use standalone Month format when appropriate

Some locales use different strings for the months depending if they are
accompanied by a numberic date or not. When we use the month name as a
standalone, we should use %OB instead to accomodate for these locales.

For more see: https://docs.gtk.org/glib/method.DateTime.format.html

Close #1546

Part-of: <https://gitlab.gnome.org/GNOME/gnome-calendar/-/merge_requests/705>
This commit is contained in:
Jordan Petridis
2026-04-23 16:28:06 +00:00
committed by Marge Bot
parent 63879a0d63
commit b900a65760
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -99,11 +99,11 @@ gcal_calendar_navigation_button_set_property (GObject *object,
gcal_clear_date_time (&self->active_date);
self->active_date = g_date_time_ref (g_value_get_boxed (value));
/*
* Translators: %B is the month name and %Y is the year.
* Translators: %OB is the month name and %Y is the year.
* More formats can be found on the doc:
* https://docs.gtk.org/glib/method.DateTime.format.html
*/
gtk_menu_button_set_label (self->button, g_date_time_format (self->active_date, _ ("%B %Y")));
gtk_menu_button_set_label (self->button, g_date_time_format (self->active_date, _ ("%OB %Y")));
break;
case PROP_ACTIVE: