From 8ee4abace3191bf02cc1bc6afce5a8ade174a92c Mon Sep 17 00:00:00 2001 From: Tomas Ogren Date: Wed, 24 Mar 1999 04:51:29 +0000 Subject: Did some i18n work Did some i18n work 1999-03-24 Tomas Ogren * gncal-week-view.c (gncal_week_view_set): Did some i18n work * eventedit.c (get_exception_string): Did some i18n work svn path=/trunk/; revision=779 --- calendar/ChangeLog | 5 +++++ calendar/eventedit.c | 2 +- calendar/gncal-week-view.c | 19 +++++++++---------- calendar/gui/eventedit.c | 2 +- calendar/gui/gncal-week-view.c | 19 +++++++++---------- 5 files changed, 25 insertions(+), 22 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 61d56d9286..f148237d57 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +1999-03-24 Tomas Ogren + + * gncal-week-view.c (gncal_week_view_set): Did some i18n work + * eventedit.c (get_exception_string): Did some i18n work + 1999-03-24 Tomas Ogren * gncal-todo.c (gncal_todo_init): Made clist titles i18n:able diff --git a/calendar/eventedit.c b/calendar/eventedit.c index 4ae35d5fe7..abd7670e8a 100644 --- a/calendar/eventedit.c +++ b/calendar/eventedit.c @@ -1285,7 +1285,7 @@ get_exception_string (time_t t) { static char buf[256]; - strftime (buf, sizeof(buf), "%a %b %d %Y", localtime (&t)); /* FIXME: how to i18n this? */ + strftime (buf, sizeof(buf), _("%a %b %d %Y"), localtime (&t)); return buf; } diff --git a/calendar/gncal-week-view.c b/calendar/gncal-week-view.c index fcfe34aec3..888c656ff4 100644 --- a/calendar/gncal-week-view.c +++ b/calendar/gncal-week-view.c @@ -224,19 +224,18 @@ gncal_week_view_set (GncalWeekView *wview, time_t start_of_week) /* The label */ { - char buf [80]; - int len; - struct tm *t; + char buf [3][100]; week_end = time_add_day (week_start, 6); - t = localtime (&week_start); - - strftime (buf, sizeof (buf), _("%a %b %d %Y - "), t); - len = strlen (buf); - t = localtime (&week_end); - strftime (buf + len, sizeof (buf) - len, _("%a %b %d %Y"), t); - gtk_label_set (GTK_LABEL (wview->label), buf); + strftime (buf[0], sizeof (buf[0]), _("%a %b %d %Y"), + localtime(&week_start)); + + strftime (buf[1], sizeof (buf[1]), _("%a %b %d %Y"), + localtime(&week_end)); + + g_snprintf(buf[2], sizeof(buf[2]), "%s - %s", buf[0], buf[1]); + gtk_label_set (GTK_LABEL (wview->label), buf[2]); } } diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c index 4ae35d5fe7..abd7670e8a 100644 --- a/calendar/gui/eventedit.c +++ b/calendar/gui/eventedit.c @@ -1285,7 +1285,7 @@ get_exception_string (time_t t) { static char buf[256]; - strftime (buf, sizeof(buf), "%a %b %d %Y", localtime (&t)); /* FIXME: how to i18n this? */ + strftime (buf, sizeof(buf), _("%a %b %d %Y"), localtime (&t)); return buf; } diff --git a/calendar/gui/gncal-week-view.c b/calendar/gui/gncal-week-view.c index fcfe34aec3..888c656ff4 100644 --- a/calendar/gui/gncal-week-view.c +++ b/calendar/gui/gncal-week-view.c @@ -224,19 +224,18 @@ gncal_week_view_set (GncalWeekView *wview, time_t start_of_week) /* The label */ { - char buf [80]; - int len; - struct tm *t; + char buf [3][100]; week_end = time_add_day (week_start, 6); - t = localtime (&week_start); - - strftime (buf, sizeof (buf), _("%a %b %d %Y - "), t); - len = strlen (buf); - t = localtime (&week_end); - strftime (buf + len, sizeof (buf) - len, _("%a %b %d %Y"), t); - gtk_label_set (GTK_LABEL (wview->label), buf); + strftime (buf[0], sizeof (buf[0]), _("%a %b %d %Y"), + localtime(&week_start)); + + strftime (buf[1], sizeof (buf[1]), _("%a %b %d %Y"), + localtime(&week_end)); + + g_snprintf(buf[2], sizeof(buf[2]), "%s - %s", buf[0], buf[1]); + gtk_label_set (GTK_LABEL (wview->label), buf[2]); } } -- cgit v1.2.3