aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-datetime-format.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-28 19:29:47 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-28 19:29:47 +0800
commit9afe9af75c7fadd556582327cda05ef978700c91 (patch)
tree8fce4d3fd13b19248bb5110b765456dada2e81ee /e-util/e-datetime-format.c
parent70241e1db9e5e5d42aa78b45845cfae6d649dc75 (diff)
downloadgsoc2013-evolution-9afe9af75c7fadd556582327cda05ef978700c91.tar.gz
gsoc2013-evolution-9afe9af75c7fadd556582327cda05ef978700c91.tar.zst
gsoc2013-evolution-9afe9af75c7fadd556582327cda05ef978700c91.zip
Fix incorrect use of ngettext from a patch for bug #635414
Diffstat (limited to 'e-util/e-datetime-format.c')
-rw-r--r--e-util/e-datetime-format.c51
1 files changed, 47 insertions, 4 deletions
diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c
index 471ca29700..df6ee06ea0 100644
--- a/e-util/e-datetime-format.c
+++ b/e-util/e-datetime-format.c
@@ -209,10 +209,53 @@ format_relative_date (time_t tvalue, time_t ttoday, const struct tm *value, cons
res = g_strdup (_("Yesterday"));
} else {
if (future) {
- /* Translators: %a is a strftime modifier, the abbreviated week day name, for example "Next Tue".
- ngettext is used to be able to define different translations for different days of week, where
- necessary. Index is between 1 and 7 inclusive, meaning 1 .. Monday, 2 .. Tuesday, ..., 7 .. Sunday */
- res = g_strdup (ngettext ("Next %a", "Next %a", g_date_get_weekday (&val)));
+ switch (g_date_get_weekday (&val)) {
+ case 1:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Mon"));
+ break;
+ case 2:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Tue"));
+ break;
+ case 3:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Wed"));
+ break;
+ case 4:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Thu"));
+ break;
+ case 5:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Fri"));
+ break;
+ case 6:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Sat"));
+ break;
+ case 7:
+ /* Translators: This is used for abbreviated days in the future.
+ You can use strftime modifiers here too, like "Next %a", to avoid
+ repeated translation of the abbreviated day name. */
+ res = g_strdup (C_ ("DateFmt", "Next Sun"));
+ break;
+ default:
+ g_return_val_if_reached (NULL);
+ break;
+ }
} else {
res = g_strdup ("%a");
}