[gnome-calendar] quick-add-popover: Properly localize string arrays
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] quick-add-popover: Properly localize string arrays
- Date: Mon, 21 Jun 2021 21:38:47 +0000 (UTC)
commit 7079cf2a808fbef7279c7fadfdfe326dd4fa1c86
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Nov 9 19:29:22 2020 -0300
quick-add-popover: Properly localize string arrays
N_() only marks strings for translation, it is necessary to call gettext()
when using the strings.
src/gui/gcal-quick-add-popover.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c
index bdb0ad75..f245e64a 100644
--- a/src/gui/gcal-quick-add-popover.c
+++ b/src/gui/gcal-quick-add-popover.c
@@ -300,7 +300,7 @@ get_date_string_for_multiday (GDateTime *start,
{
const gchar *start_weekday_str;
- start_weekday_str = start_date_weekdays_strings [g_date_time_get_day_of_week (start) - 1];
+ start_weekday_str = gettext (start_date_weekdays_strings[g_date_time_get_day_of_week (start) - 1]);
start_date_str = g_strdup_printf ("%s", start_weekday_str);
}
else
@@ -313,7 +313,7 @@ get_date_string_for_multiday (GDateTime *start,
* name and a date of month.
*/
start_date_str = g_strdup_printf (_("from %1$s %2$s"),
- month_names [g_date_time_get_month (start) - 1],
+ gettext (month_names[g_date_time_get_month (start) - 1]),
day_number_str);
g_free (day_number_str);
}
@@ -337,7 +337,7 @@ get_date_string_for_multiday (GDateTime *start,
{
const gchar *end_weekday_str;
- end_weekday_str = end_date_weekdays_strings [g_date_time_get_day_of_week (end) - 1];
+ end_weekday_str = gettext (end_date_weekdays_strings[g_date_time_get_day_of_week (end) - 1]);
end_date_str = g_strdup_printf ("%s", end_weekday_str);
}
else
@@ -350,7 +350,7 @@ get_date_string_for_multiday (GDateTime *start,
* name and a date of month.
*/
end_date_str = g_strdup_printf (_("to %1$s %2$s"),
- month_names [g_date_time_get_month (end) - 1],
+ gettext (month_names[g_date_time_get_month (end) - 1]),
day_number_str);
g_free (day_number_str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]