]> spindle.queued.net Git - midori/commitdiff
Localize 'Last updated' display of feeds and quote URIs
authorChristian Dywan <christian@twotoasts.de>
Wed, 29 Apr 2009 21:46:41 +0000 (23:46 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 29 Apr 2009 21:46:41 +0000 (23:46 +0200)
extensions/feed-panel/feed-panel.c
extensions/feed-panel/main.c

index 167b4039de770568ec5eee9411652e4fd73e2c62..d8212a8a2f07246616aa1abb048d13e3622e8fd4 100644 (file)
@@ -376,19 +376,28 @@ feed_panel_cursor_or_row_changed_cb (GtkTreeView* treeview,
                 date = katze_item_get_added (item);
                 if (date)
                 {
-                    SoupDate* sdate;
+                    time_t date_t;
+                    const struct tm* tm;
+                    static gchar date_format[512];
                     const gchar* puri;
                     KatzeItem* parent;
-                    sdate = soup_date_new_from_time_t ((time_t) date);
+                    gchar* last_updated;
 
+                    date_t = (time_t)date;
+                    tm = localtime (&date_t);
+                    /* Some gcc versions complain about "%c" for no reason */
+                    strftime (date_format, sizeof (date_format), "%c", tm);
                     parent = katze_item_get_parent (item);
                     g_assert (KATZE_IS_ARRAY (parent));
                     puri = katze_item_get_uri (parent);
+    /* i18n: The local date a feed was last updated */
+                    last_updated = g_strdup_printf (C_("Feed", "Last updated: %s."),
+                                                    date_format);
                     text = g_strdup_printf (
                             "<html><head><title>feed</title></head>"
-                            "<body><h3>%s</h3><p />Last updated %s.</body></html>",
-                            puri, soup_date_to_string (sdate, SOUP_DATE_HTTP));
-                    soup_date_free (sdate);
+                            "<body><h3>%s</h3><p />%s</body></html>",
+                            puri, last_updated);
+                    g_free (last_updated);
                 }
             }
             webkit_web_view_load_html_string (
index 38fba899a1033d8bda2a3d23646cf77fcc3769d2..d0a13092ea2d84ea406aaaa6d5c55e233caaebdb 100644 (file)
@@ -111,7 +111,7 @@ feed_add_item (KatzeArray*  feeds,
                 NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
                 _("Error"));
                 gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
-                _("Feed %s already exists"), uri);
+                _("Feed '%s' already exists"), uri);
             gtk_window_set_title (GTK_WINDOW (dialog), EXTENSION_NAME);
             gtk_widget_show (dialog);
             g_signal_connect_swapped (dialog, "response",
@@ -188,7 +188,7 @@ feed_status_cb (KatzeNetRequest*  request,
     {
         gchar* msg;
 
-        msg = g_strdup_printf (_("Error loading feed %s"),
+        msg = g_strdup_printf (_("Error loading feed '%s'"),
                         katze_item_get_uri (KATZE_ITEM (netpriv->feed)));
         feed_handle_net_error (netpriv, msg);
         g_free (msg);