From 402218880ebaba874fdbc0f385ed92576d46cb2f Mon Sep 17 00:00:00 2001 From: Chyla Zbigniew Date: Sun, 19 Aug 2001 20:22:35 +0000 Subject: Marked string for translation (connection type). * my-evolution/e-summary-rdf.c (make_connection): Marked string for translation (connection type). * my-evolution/e-summary-weather.c (make_url): Split into two functions: make_url and make_anchor. (weather_make_html): s/make_url/make_anchor/ (make_connection): Marked connection type string for franslation, assign the real URI to ->hostname (using make_url), not location code. svn path=/trunk/; revision=12226 --- my-evolution/ChangeLog | 11 +++++++++++ my-evolution/e-summary-rdf.c | 2 +- my-evolution/e-summary-weather.c | 25 ++++++++++++++++++------- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index d946d0ade0..2d2f7c8c6f 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,14 @@ +2001-08-17 Zbigniew Chyla + + * my-evolution/e-summary-rdf.c (make_connection): + Marked string for translation (connection type). + + * my-evolution/e-summary-weather.c + (make_url): Split into two functions: make_url and make_anchor. + (weather_make_html): s/make_url/make_anchor/ + (make_connection): Marked connection type string for franslation, + assign the real URI to ->hostname (using make_url), not location code. + 2001-08-12 Zbigniew Chyla * e-summary-preferences.c (make_initial_weather_list), diff --git a/my-evolution/e-summary-rdf.c b/my-evolution/e-summary-rdf.c index 857c0be747..3ab6fe2816 100644 --- a/my-evolution/e-summary-rdf.c +++ b/my-evolution/e-summary-rdf.c @@ -476,7 +476,7 @@ make_connection (RDF *r) d = g_new (ESummaryConnectionData, 1); d->hostname = g_strdup (r->uri); - d->type = g_strdup ("RDF Summary"); + d->type = g_strdup (_("RDF Summary")); return d; } diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index 53cd64d43d..cd349d8710 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -75,10 +75,21 @@ e_summary_weather_get_html (ESummary *summary) } static char * -make_url (const char *name, - const char *code) +make_url (const char *code) { - return g_strdup_printf ("%s", code, name); + return g_strdup_printf ("http://weather.noaa.gov/cgi-bin/mgetmetar.pl?cccc=%s", code); +} + +static char * +make_anchor (const char *name, const char *code) +{ + char *url, *anchor; + + url = make_url (code); + anchor = g_strdup_printf ("%s", url, name); + g_free (url); + + return anchor; } static void @@ -95,9 +106,9 @@ weather_make_html (Weather *w) "src=\"%s\"> ", icon_name); location = g_hash_table_lookup (locations_hash, w->location); if (location == NULL) { - url = make_url (w->location, w->location); + url = make_anchor (w->location, w->location); } else { - url = make_url (location->name, w->location); + url = make_anchor (location->name, w->location); } g_string_append (string, url); @@ -497,8 +508,8 @@ make_connection (Weather *w) ESummaryConnectionData *data; data = g_new (ESummaryConnectionData, 1); - data->hostname = g_strdup (w->location); - data->type = g_strdup ("Weather"); + data->hostname = make_url (w->location); + data->type = g_strdup (_("Weather")); return data; } -- cgit