From c4f09e65813f4a6783a50507901e3a1c133aff43 Mon Sep 17 00:00:00 2001 From: Gediminas Paulauskas Date: Sat, 21 Apr 2001 23:28:28 +0000 Subject: translate "Things to do" etc. and convert them to utf8. Changed some link 2001-04-21 Gediminas Paulauskas * gui/calendar-summary.c: translate "Things to do" etc. and convert them to utf8. Changed some link from helixcode to ximian. svn path=/trunk/; revision=9491 --- calendar/gui/calendar-summary.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/calendar-summary.c b/calendar/gui/calendar-summary.c index fd7ff0fbf2..89e528716e 100644 --- a/calendar/gui/calendar-summary.c +++ b/calendar/gui/calendar-summary.c @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -183,7 +184,8 @@ generate_html_summary (gpointer data) time_t t, day_begin, day_end; struct tm *timeptr; GList *uids, *l; - char *ret_html, *tmp, *datestr; + char *ret_html, *datestr; + char *tmp, *tmp2; summary = data; @@ -193,15 +195,20 @@ generate_html_summary (gpointer data) datestr = g_new (char, 256); timeptr = localtime (&t); - strftime (datestr, 255, _("%A, %e %B %Y"), timeptr); - ret_html = g_strdup_printf ("%s", datestr); + strftime (datestr, 255, _("%A, %e %B %Y"), + timeptr); + tmp = g_strdup_printf ("%s", datestr); + ret_html = e_utf8_from_locale_string (tmp); + g_free (tmp); g_free (datestr); if (summary->appointments) { tmp = ret_html; - ret_html = g_strdup_printf ("%s

Appointments


    ", - tmp); + tmp2 = e_utf8_from_locale_string (_("Appointments")); + ret_html = g_strconcat (tmp, "

    ", + tmp2, "


      ", NULL); g_free (tmp); + g_free (tmp2); uids = cal_client_get_objects_in_range (summary->client, CALOBJ_TYPE_EVENT, day_begin, @@ -218,7 +225,6 @@ generate_html_summary (gpointer data) struct tm *start_tm, *end_tm; char *start_str, *end_str; char *uid; - char *tmp2; uid = l->data; status = cal_client_get_object (summary->client, uid, &comp); @@ -266,10 +272,11 @@ generate_html_summary (gpointer data) if (summary->tasks) { tmp = ret_html; - ret_html = g_strconcat (ret_html, - "

      Tasks


        ", - NULL); + tmp2 = e_utf8_from_locale_string (_("Tasks")); + ret_html = g_strconcat (tmp, "

        ", + tmp2, "


          ", NULL); g_free (tmp); + g_free (tmp2); /* Generate a list of tasks */ uids = cal_client_get_uids (summary->client, CALOBJ_TYPE_TODO); @@ -279,7 +286,6 @@ generate_html_summary (gpointer data) CalClientGetStatus status; struct icaltimetype *completed; char *uid; - char *tmp2; uid = l->data; status = cal_client_get_object (summary->client, uid, &comp); @@ -554,7 +560,7 @@ summary_to_string (CalSummary *summary) xmlNsPtr ns; doc = xmlNewDoc ("1.0"); - ns = xmlNewGlobalNs (doc, "http://www.helixcode.com", "calendar-summary"); + ns = xmlNewGlobalNs (doc, "http://www.ximian.com", "calendar-summary"); doc->root = xmlNewDocNode (doc, ns, "calendar-summary", NULL); xmlNewChild (doc->root, ns, "showappointments", @@ -681,7 +687,7 @@ create_summary_view (ExecutiveSummaryComponentFactory *_factory, summary = g_new (CalSummary, 1); summary->component = EXECUTIVE_SUMMARY_COMPONENT (component); summary->icon = g_strdup ("evolution-calendar.png"); - summary->title = g_strdup ("Things to do"); + summary->title = e_utf8_from_locale_string (_("Things to do")); summary->client = cal_client_new (); summary->idle = 0; summary->appointments = TRUE; @@ -764,7 +770,7 @@ calendar_summary_factory_init (void) NULL); if (factory == NULL) { - g_warning ("Cannot initialise calendar summary factory"); + g_warning ("Cannot initialize calendar summary factory"); return NULL; } -- cgit v1.2.3