aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-format.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2003-08-23 05:14:36 +0800
committerMichael Zucci <zucchi@src.gnome.org>2003-08-23 05:14:36 +0800
commitcbf3647544de3dc02853c1652cfdbbeb29ce93dd (patch)
tree75355fecf90a56c2cd7aeb053afccff1b98bdba6 /mail/mail-format.c
parentbc43a79394e30a2d28984262ce37f74a12acec00 (diff)
downloadgsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.gz
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.tar.zst
gsoc2013-evolution-cbf3647544de3dc02853c1652cfdbbeb29ce93dd.zip
translate the local time format.
2003-08-22 Not Zed <NotZed@Ximian.com> * mail-format.c (write_date): translate the local time format. 2003-08-20 David Woodhouse <dwmw2@infradead.org> * mail-format.c (write_date): Use e_utf8_strftime() to generate localised time; avoid gratuitous extra translation and array of day names, and the autoconf magic which made Not Zed dislike the inclusion of the timezone name. 2003-08-05 Not Zed <NotZed@Ximian.com> ** See bug #32732 * message-list.c (mail_regen_list): use thread_new. * mail-local.c (reconfigure_response): use thread_new. * mail-display.c (stream_write_or_redisplay_when_loaded): use thread_new. * mail-config.c (mail_config_check_service): use thread_new rather than queue. * mail-callbacks.c (view_msg): change to use mail_get_messages(), fixes FIXME. (do_view_messages): handle get_messages callback. (do_view_message): removed. * mail-ops.c (mail_get_folderinfo): Use a new thread thread semantic. (mail_save_part): " (mail_store_set_offline): " (mail_sync_folder): use queued_slow thread queue. (mail_expunge_folder): " (mail_empty_trash): " svn path=/trunk/; revision=22340
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r--mail/mail-format.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 85f91d0d80..92428af592 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -775,11 +775,6 @@ write_field_row_begin (MailDisplayStream *stream, const char *name, int flags)
}
}
-/* day of the week names shown for remote mail offsets */
-static char *tz_days [] = {
- N_("Sun"), N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat")
-};
-
static void
write_date (MailDisplayStream *stream, CamelMimeMessage *message, int flags)
{
@@ -806,15 +801,21 @@ write_date (MailDisplayStream *stream, CamelMimeMessage *message, int flags)
if (msg_offset) {
/* Message timezone different from local. Show both */
- camel_stream_printf((CamelStream *)stream, "<I> (");
-
+ char buf[30];
+
msg_offset += (local.tm_hour * 60) + local.tm_min;
+
if (msg_offset >= (24 * 60) || msg_offset < 0) {
/* Timezone conversion crossed midnight. Show day */
- camel_stream_printf((CamelStream *)stream, "%s, ", _(tz_days[local.tm_wday]));
+ /* translators: strftime format for local time equivalent in Date header display */
+ e_utf8_strftime(buf, 29, _("<I> (%a, %R %Z)</I>"), &local);
+ } else {
+ e_utf8_strftime(buf, 29, _("<I> (%R %Z)</I>"), &local);
}
- /* translators: 'localtime' equivalent shown in date header for mails from other timezones */
- camel_stream_printf((CamelStream *)stream, "%02d:%02d %s)</I>", local.tm_hour, local.tm_min, _("localtime"));
+
+ /* I doubt any locales put '%' in time representation
+ but just in case... */
+ camel_stream_printf((CamelStream *)stream, "%s", buf);
}
camel_stream_printf ((CamelStream *) stream, "</td> </tr>");