aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-28 19:29:47 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:40 +0800
commit095a0e5d65a7029cc8abc9ba8c7ca01de3836556 (patch)
tree586f11c98b296d903d9a24d70c3306f223c06c1e /e-util
parent057f0c4d24baea15cc60d2627b59964a0fa3a049 (diff)
downloadgsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar.gz
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar.bz2
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar.lz
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar.xz
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.tar.zst
gsoc2013-evolution-095a0e5d65a7029cc8abc9ba8c7ca01de3836556.zip
Fix incorrect use of ngettext from a patch for bug #635414
Diffstat (limited to 'e-util')
-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");
}