The attached patch marks strings for translaton in a few places (and does
some minor changes). Ok to commit?


Zbigniew
diff -rup --exclude=intl --exclude=po /home/cyba/gcvs/evolution/addressbook/ChangeLog 
evolution/addressbook/ChangeLog
--- /home/cyba/gcvs/evolution/addressbook/ChangeLog     Sat Jun 16 00:46:24 2001
+++ evolution/addressbook/ChangeLog     Tue Jun 19 15:53:57 2001
@@ -1,1 +1,6 @@
+2001-06-19  Zbigniew Chyla  <[EMAIL PROTECTED]>
+
+       * gui/component/e-address-popup.c (e_address_popup_construct): Marked
+       strings for translation.
+
 2001-06-15  Chris Toshok  <[EMAIL PROTECTED]>
diff -rup --exclude=intl --exclude=po 
/home/cyba/gcvs/evolution/addressbook/gui/component/e-address-popup.c 
evolution/addressbook/gui/component/e-address-popup.c
--- /home/cyba/gcvs/evolution/addressbook/gui/component/e-address-popup.c       Mon 
Apr 30 09:27:05 2001
+++ evolution/addressbook/gui/component/e-address-popup.c       Mon Jun 18 22:19:23 
+2001
@@ -187,7 +187,7 @@ e_address_popup_construct (EAddressPopup
        gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->generic_view, TRUE, TRUE, 
0);
        gtk_widget_show_all (pop->generic_view);
 
-       pop->query_msg = gtk_label_new ("Querying Addressbook...");
+       pop->query_msg = gtk_label_new (_("Querying Addressbook..."));
        gtk_box_pack_start (GTK_BOX (pop->main_vbox), pop->query_msg, TRUE, TRUE, 0);
        gtk_widget_show (pop->query_msg);
 
@@ -244,7 +244,7 @@ e_address_popup_cardify (EAddressPopup *
        gtk_widget_show (pop->minicard_view);
        gtk_widget_hide (pop->generic_view);
 
-       b = gtk_button_new_with_label ("Edit Contact Info");
+       b = gtk_button_new_with_label (_("Edit Contact Info"));
        gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
        gtk_signal_connect_object (GTK_OBJECT (b),
                                   "clicked",
@@ -275,7 +275,7 @@ e_address_popup_no_matches (EAddressPopu
 
        g_return_if_fail (pop && E_IS_ADDRESS_POPUP (pop));
 
-       b = gtk_button_new_with_label ("Add to Contacts");
+       b = gtk_button_new_with_label (_("Add to Contacts"));
        gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
        gtk_signal_connect_object (GTK_OBJECT (b),
                                   "clicked",
diff -rup --exclude=intl --exclude=po /home/cyba/gcvs/evolution/my-evolution/ChangeLog 
evolution/my-evolution/ChangeLog
--- /home/cyba/gcvs/evolution/my-evolution/ChangeLog    Fri Jun 15 19:12:09 2001
+++ evolution/my-evolution/ChangeLog    Tue Jun 19 16:50:29 2001
@@ -1,1 +1,21 @@
+2001-06-19  Zbigniew Chyla  <[EMAIL PROTECTED]>
+
+       * e-summary-calendar.c (generate_html):
+       Marked strings for translation + conversion to utf8.
+
+       * e-summary-mail.c
+       Added missing #include <config.h>
+       (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
+       Added #include <stdlib.h> for atoi.
+       (tree_walk): Fixed leaks.
+       (read_callback): Marked strings for translation.
+
 2001-06-15  JP Rosevear  <[EMAIL PROTECTED]>
diff -rup --exclude=intl --exclude=po 
/home/cyba/gcvs/evolution/my-evolution/e-summary-calendar.c 
evolution/my-evolution/e-summary-calendar.c
--- /home/cyba/gcvs/evolution/my-evolution/e-summary-calendar.c Fri Jun  8 22:47:48 
2001
+++ evolution/my-evolution/e-summary-calendar.c Tue Jun 19 15:20:58 2001
@@ -11,6 +11,7 @@
 #endif
 
 #include <gnome.h>
+#include <gal/widgets/e-unicode.h>
 
 #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 ("<dl><dt><img src=\"ico-calendar.png\" 
align=\"middle\" "
-                                          "alt=\"\" width=\"48\" height=\"48\"> <b><a 
href=\"evolution:/local/Calendar\">Appointments</a>"
-                                          "</b></dt><dd><b>No 
appointments</b></dd></dl>");
+               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 ("<dl><dt><img src=\"ico-calendar.png\" 
+align=\"middle\" "
+                                             "alt=\"\" width=\"48\" height=\"48\"> 
+<b><a href=\"evolution:/local/Calendar\">",
+                                             s1, "</a></b></dt><dd><b>", s2, 
+"</b></dd></dl>", 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 ("<dl><dt><img src=\"ico-calendar.png\" 
align=\"middle\" "
-                                      "alt=\"\" width=\"48\" height=\"48\"> <b><a 
href=\"evolution:/local/Calendar\">Appointments</a>"
-                                      "</b></dt><dd>");
+                                      "alt=\"\" width=\"48\" height=\"48\"> <b><a 
+href=\"evolution:/local/Calendar\">");
+               s = e_utf8_from_locale_string (_("Appointments"));
+               g_string_append (string, s);
+               g_free (s);
+               g_string_append (string, "</a></b></dt><dd>");
                for (l = uids; l; l = l->next) {
                        char *uid, *start_str;
                        CalComponent *comp;
diff -rup --exclude=intl --exclude=po 
/home/cyba/gcvs/evolution/my-evolution/e-summary-mail.c 
evolution/my-evolution/e-summary-mail.c
--- /home/cyba/gcvs/evolution/my-evolution/e-summary-mail.c     Fri Jun  8 22:47:48 
2001
+++ evolution/my-evolution/e-summary-mail.c     Tue Jun 19 15:21:32 2001
@@ -6,12 +6,18 @@
  * Authors: Iain Holmes  <[EMAIL PROTECTED]>
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
 #include <liboaf/liboaf.h>
+#include <gal/widgets/e-unicode.h>
 
 #include "Mail.h"
 #include "e-summary.h"
 #include "e-summary-mail.h"
 
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
 #include <gtk/gtksignal.h>
 #include <bonobo/bonobo-exception.h>
 #include <bonobo/bonobo-listener.h>
@@ -86,12 +92,16 @@ e_summary_mail_generate_html (ESummary *
 {
        ESummaryMail *mail;
        GString *string;
+       char *s;
 
        mail = summary->mail;
        string = g_string_new ("<dl><dt><img src=\"ico-mail.png\" "
-                              "align=\"middle\" alt=\"\" width=\"48\" "
-                              "height=\"48\"> <b><a 
href=\"evolution:/local/Inbox\">Mail summary</a>"
-                              "</b></dt><dd><table numcols=\"2\" width=\"100%\">");
+                              "align=\"middle\" alt=\"\" width=\"48\" "
+                              "height=\"48\"> <b><a 
+href=\"evolution:/local/Inbox\">");
+       s = e_utf8_from_locale_string (_("Mail summary"));
+       g_string_append (string, s);
+       g_free (s);
+       g_string_append (string, "</a></b></dt><dd><table numcols=\"2\" 
+width=\"100%\">");
        
        g_hash_table_foreach (mail->folders, folder_gen_html, string);
 
diff -rup --exclude=intl --exclude=po 
/home/cyba/gcvs/evolution/my-evolution/e-summary-rdf.c 
evolution/my-evolution/e-summary-rdf.c
--- /home/cyba/gcvs/evolution/my-evolution/e-summary-rdf.c      Fri Jun  8 22:47:48 
2001
+++ evolution/my-evolution/e-summary-rdf.c      Tue Jun 19 15:23:45 2001
@@ -11,7 +11,10 @@
 #include <config.h>
 #endif
 
+#include <stdlib.h>
 #include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
 #include <gnome-xml/parser.h>
 #include <gnome-xml/xmlmemory.h>
 
@@ -222,7 +225,9 @@ tree_walk (xmlNodePtr root,
                full = g_strdup_printf ("<a href=\"%s\">", 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, "</a>");
        }
@@ -271,7 +276,9 @@ tree_walk (xmlNodePtr root,
                        g_free (tmp);
                }
                
-               tmp = g_strdup_printf ("%s\n</A></font></li>", 
e_utf8_from_locale_string (p));
+               p = e_utf8_from_locale_string (p);
+               tmp = g_strdup_printf ("%s\n</A></font></li>", p);
+               g_free (p);
                g_string_append (html, tmp);
                g_free (tmp);
        }
@@ -348,7 +355,7 @@ read_callback (GnomeVFSAsyncHandle *hand
               RDF *r)
 {
        if (result != GNOME_VFS_OK && result != GNOME_VFS_ERROR_EOF) {
-               r->html = g_strdup ("<b>Error downloading RDF</b>");
+               r->html = e_utf8_from_locale_string (_("<b>Error downloading 
+RDF</b>"));
 
                e_summary_draw (r->summary);
                r->handle = NULL;
@@ -374,7 +381,7 @@ open_callback (GnomeVFSAsyncHandle *hand
               RDF *r)
 {
        if (result != GNOME_VFS_OK) {
-               r->html = g_strdup ("<b>Error downloading RDF</b>");
+               r->html = e_utf8_from_locale_string (_("<b>Error downloading 
+RDF</b>"));
 
                e_summary_draw (r->summary);
                return;
diff -rup --exclude=intl --exclude=po 
/home/cyba/gcvs/evolution/my-evolution/e-summary-weather.c 
evolution/my-evolution/e-summary-weather.c
--- /home/cyba/gcvs/evolution/my-evolution/e-summary-weather.c  Sat Jun  9 00:38:47 
2001
+++ evolution/my-evolution/e-summary-weather.c  Tue Jun 19 15:48:05 2001
@@ -37,14 +37,19 @@ e_summary_weather_get_html (ESummary *su
        GList *weathers;
        GString *string;
        char *html;
+       char *s;
 
        if (summary->weather == NULL) {
                return NULL;
        }
 
        string = g_string_new ("<dl><img src=\"ico-weather.png\" align=\"middle\" "
-                              "alt=\"\" width=\"48\" height=\"48\"><b>"
-                              "<a href=\"http://www.metoffice.gov.uk\";>My 
Weather</a></b>");
+                              "alt=\"\" width=\"48\" height=\"48\"><b>"
+                              "<a href=\"http://www.metoffice.gov.uk\";>");
+       s = e_utf8_from_locale_string (_("My Weather"));
+       g_string_append (string, s);
+       g_free (s);
+       g_string_append (string, "</a></b>");
        for (weathers = summary->weather->weathers; weathers; weathers = 
weathers->next) {
                if (((Weather *)weathers->data)->html == NULL) {
                        continue;
@@ -73,7 +78,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 ("<dd><img align=\"middle\" "
                               "src=\"es-weather.png\">&#160;<b>");
@@ -92,11 +97,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, "<font size=\"-1\">");
@@ -270,7 +281,7 @@ open_callback (GnomeVFSAsyncHandle *hand
               Weather *w)
 {
        if (result != GNOME_VFS_OK) {
-               w->html = g_strdup ("<b>Error downloading Metar</b>");
+               w->html = e_utf8_from_locale_string (_("<b>Error downloading 
+Metar</b>"));
 
                e_summary_draw (w->summary);
                return;
--- /home/cyba/gcvs/evolution/po/ChangeLog      Mon Jun 18 23:30:05 2001
+++ evolution/po/ChangeLog      Tue Jun 19 16:57:10 2001
@@ -1,1 +1,6 @@
+2001-06-19  Zbigniew Chyla  <[EMAIL PROTECTED]>
+       * POTFILES.in:
+       Added addressbook/gui/component/e-address-popup.c,
+       my-evolution/e-summary-calendar.c, my-evolution/e-summary-mail.c,
+       my-evolution/e-summary-rdf.c, my-evolution/e-summary-weather.c.
 
--- /home/cyba/gcvs/evolution/po/POTFILES.in    Sat Jun 16 00:50:04 2001
+++ evolution/po/POTFILES.in    Tue Jun 19 14:59:59 2001
@@ -18,6 +18,7 @@
 addressbook/gui/component/addressbook-config.glade
 addressbook/gui/component/addressbook-factory.c
 addressbook/gui/component/addressbook-storage.c
+addressbook/gui/component/e-address-popup.c
 addressbook/gui/component/e-address-widget.c
 addressbook/gui/component/GNOME_Evolution_Addressbook.oaf.in
 addressbook/gui/component/select-names/e-select-names-popup.c
@@ -212,6 +213,10 @@
 mail/message-list.c
 mail/mail-session.c
 mail/subscribe-dialog.c
+my-evolution/e-summary-calendar.c
+my-evolution/e-summary-mail.c
+my-evolution/e-summary-rdf.c
+my-evolution/e-summary-weather.c
 shell/e-setup.c
 shell/e-shell.c
 shell/e-shell-folder-commands.c

Reply via email to