From b190305858a16818773cdf855a6d78eda2ee6bda Mon Sep 17 00:00:00 2001 From: Chyla Zbigniew Date: Sat, 30 Jun 2001 12:08:27 +0000 Subject: Marked strings for translation + conversion to utf8. * e-summary-calendar.c (generate_html): Marked strings for translation + conversion to utf8. * e-summary-mail.c Added missing #include (e_summary_mail_generate_html): Marked strings for translation + conversion to utf8. * e-summary-weather.c (e_summary_weather_get_html, open_callback): Marked strings for translation + conversion to utf8. (weather_make_html): Fixed leaks. * e-summary-rdf.c (tree_walk): Fixed leaks. (read_callback): Marked strings for translation. svn path=/trunk/; revision=10630 --- my-evolution/ChangeLog | 19 +++++++++++++++++++ my-evolution/e-summary-calendar.c | 26 ++++++++++++++++++-------- my-evolution/e-summary-mail.c | 16 +++++++++++++--- my-evolution/e-summary-rdf.c | 14 ++++++++++---- my-evolution/e-summary-weather.c | 29 ++++++++++++++++++++--------- 5 files changed, 80 insertions(+), 24 deletions(-) (limited to 'my-evolution') diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index 0bdf41d197..8935cd8a09 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,22 @@ +2001-06-30 Zbigniew Chyla + + * e-summary-calendar.c (generate_html): + Marked strings for translation + conversion to utf8. + + * e-summary-mail.c + Added missing #include + (e_summary_mail_generate_html): + Marked strings for translation + conversion to utf8. + + * e-summary-weather.c + (e_summary_weather_get_html, open_callback): + Marked strings for translation + conversion to utf8. + (weather_make_html): Fixed leaks. + + * e-summary-rdf.c + (tree_walk): Fixed leaks. + (read_callback): Marked strings for translation. + 2001-06-29 Iain Holmes * e-summary.c (e_summary_draw): Resurrect the hack to stop GtkHTML from diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c index 3bc2b21f46..71e3e4670b 100644 --- a/my-evolution/e-summary-calendar.c +++ b/my-evolution/e-summary-calendar.c @@ -11,6 +11,7 @@ #endif #include +#include #include "e-summary-calendar.h" #include "e-summary.h" @@ -152,21 +153,30 @@ generate_html (gpointer data) CALOBJ_TYPE_EVENT, day_begin, day_end); if (uids == NULL) { - if (calendar->html) { - g_free (calendar->html); - } - calendar->html = g_strdup ("
Appointments" - "
No appointments
"); + char *s1, *s2; + + s1 = e_utf8_from_locale_string (_("Appointments")); + s2 = e_utf8_from_locale_string (_("No appointments")); + g_free (calendar->html); + calendar->html = g_strconcat ("
", + s1, "
", s2, "
", NULL); + g_free (s1); + g_free (s2); e_summary_draw (summary); return FALSE; } else { + char *s; + uids = cal_list_sort (uids, sort_uids, summary); string = g_string_new ("
Appointments" - "
"); + "alt=\"\" width=\"48\" height=\"48\"> "); + s = e_utf8_from_locale_string (_("Appointments")); + g_string_append (string, s); + g_free (s); + g_string_append (string, "
"); for (l = uids; l; l = l->next) { char *uid, *start_str; CalComponent *comp; diff --git a/my-evolution/e-summary-mail.c b/my-evolution/e-summary-mail.c index 2453a93d6a..4ce4fd90c9 100644 --- a/my-evolution/e-summary-mail.c +++ b/my-evolution/e-summary-mail.c @@ -6,12 +6,18 @@ * Authors: Iain Holmes */ +#ifdef HAVE_CONFIG_H +#include +#endif #include +#include #include "Mail.h" #include "e-summary.h" #include "e-summary-mail.h" +#include +#include #include #include #include @@ -85,12 +91,16 @@ e_summary_mail_generate_html (ESummary *summary) ESummaryMail *mail; GString *string; GList *p; + gchar *s; mail = summary->mail; string = g_string_new ("
\"\" Mail summary" - "
"); + "align=\"middle\" alt=\"\" width=\"48\" " + "height=\"48\"> "); + s = e_utf8_from_locale_string (_("Mail summary")); + g_string_append (string, s); + g_free (s); + g_string_append (string, "
"); for (p = mail->shown; p; p = p->next) { folder_gen_html (p->data, string); diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index 0980640542..0cd7bb8c33 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -18,6 +18,8 @@ #include #include +#include +#include #include #include #include "e-summary.h" @@ -235,7 +237,9 @@ tree_walk (xmlNodePtr root, full = g_strdup_printf ("", u); g_string_append (html, full); } - g_string_append (html, e_utf8_from_locale_string (t)); + t = e_utf8_from_locale_string (t); + g_string_append (html, t); + g_free (t); if (*u != '\0') { g_string_append (html, ""); } @@ -284,7 +288,9 @@ tree_walk (xmlNodePtr root, g_free (tmp); } - tmp = g_strdup_printf ("%s\n", e_utf8_from_locale_string (p)); + p = e_utf8_from_locale_string (p); + tmp = g_strdup_printf ("%s\n", p); + g_free (p); g_string_append (html, tmp); g_free (tmp); } @@ -361,7 +367,7 @@ read_callback (GnomeVFSAsyncHandle *handle, RDF *r) { if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) { - r->html = g_strdup ("Error downloading RDF"); + r->html = e_utf8_from_locale_string (_("Error downloading RDF")); e_summary_draw (r->summary); r->handle = NULL; @@ -387,7 +393,7 @@ open_callback (GnomeVFSAsyncHandle *handle, RDF *r) { if (result != GNOME_VFS_OK) { - r->html = g_strdup ("Error downloading RDF"); + r->html = e_utf8_from_locale_string (_("Error downloading RDF")); e_summary_draw (r->summary); return; diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index ebe6158e95..ed8847f1eb 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -41,14 +41,19 @@ e_summary_weather_get_html (ESummary *summary) GList *weathers; GString *string; char *html; + char *s; if (summary->weather == NULL) { return NULL; } string = g_string_new ("
" - "My Weather"); + "alt=\"\" width=\"48\" height=\"48\">" + ""); + s = e_utf8_from_locale_string (_("My Weather")); + g_string_append (string, s); + g_free (s); + g_string_append (string, ""); for (weathers = summary->weather->weathers; weathers; weathers = weathers->next) { if (((Weather *)weathers->data)->html == NULL) { continue; @@ -77,7 +82,7 @@ weather_make_html (Weather *w) { GString *string; ESummaryWeatherLocation *location; - char *sky, *temp, *cond, *uri, *url; + char *sky, *temp, *cond, *uri, *url, *s; string = g_string_new ("
 "); @@ -96,11 +101,17 @@ weather_make_html (Weather *w) temp = weather_temp_string (w); cond = (char *) weather_conditions_string (w); - g_string_append (string, e_utf8_from_locale_string (sky)); - g_string_append (string, " "); - g_string_append (string, e_utf8_from_locale_string (cond)); - g_string_append (string, " "); - g_string_append (string, e_utf8_from_locale_string (temp)); + s = e_utf8_from_locale_string (sky); + g_string_append (string, s); + g_free (s); + g_string_append_c (string, ' '); + s = e_utf8_from_locale_string (cond); + g_string_append (string, s); + g_free (s); + g_string_append_c (string, ' '); + s = e_utf8_from_locale_string (temp); + g_string_append (string, s); + g_free (s); g_free (temp); g_string_append (string, ""); @@ -274,7 +285,7 @@ open_callback (GnomeVFSAsyncHandle *handle, Weather *w) { if (result != GNOME_VFS_OK) { - w->html = g_strdup ("Error downloading Metar"); + w->html = e_utf8_from_locale_string (_("Error downloading Metar")); e_summary_draw (w->summary); return; -- cgit