]> spindle.queued.net Git - midori/commitdiff
Localization string improvements
authorChristian Dywan <christian@twotoasts.de>
Sun, 30 Nov 2008 01:08:28 +0000 (02:08 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 30 Nov 2008 01:08:28 +0000 (02:08 +0100)
extensions/statusbar-features.c
midori/main.c
midori/midori-view.c

index 88006c18a1f578f646c3fb3fcdbb56fd7e332710..fb8cada1315733d39efa3fcda04e555785cb402b 100644 (file)
@@ -27,11 +27,24 @@ statusbar_features_app_add_browser_cb (MidoriApp*     app,
     bbox = gtk_hbox_new (FALSE, 0);
     settings = katze_object_get_object (browser, "settings");
     button = katze_property_proxy (settings, "auto-load-images", NULL);
-    gtk_button_set_label (GTK_BUTTON (button), _("Load images automatically"));
+    gtk_button_set_label (GTK_BUTTON (button), _("Images"));
+    #if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (button, _("Load images automatically"));
+    #endif
     gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 2);
     gtk_widget_show (button);
     button = katze_property_proxy (settings, "enable-scripts", NULL);
-    gtk_button_set_label (GTK_BUTTON (button), _("Enable scripts"));
+    gtk_button_set_label (GTK_BUTTON (button), _("Scripts"));
+    #if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (button, _("Enable scripts"));
+    #endif
+    gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 2);
+    gtk_widget_show (button);
+    button = katze_property_proxy (settings, "enable-plugins", NULL);
+    gtk_button_set_label (GTK_BUTTON (button), _("Plugins"));
+    #if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (button, _("Enable plugins"));
+    #endif
     gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 2);
     gtk_widget_show (button);
     gtk_widget_show (bbox);
index 2d042d71fd1c4c27775f2ae8d5ebd9dd37bfe2ee..4a18ae0823b3fbfe9b1aabd2592e024ce6359b1c 100644 (file)
@@ -1308,7 +1308,7 @@ main (int    argc,
             GTK_MESSAGE_DIALOG (dialog), "%s", error_messages->str);
         gtk_dialog_add_buttons (GTK_DIALOG (dialog),
                                 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
-                                "_Ignore", GTK_RESPONSE_ACCEPT,
+                                _("_Ignore"), GTK_RESPONSE_ACCEPT,
                                 NULL);
         if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
         {
index 6b09e13e53a648057ef7c42cd929cb3eb525c2db..1cf76301c9c7eaaca9894afd5671771b5ea98cb8 100644 (file)
@@ -542,21 +542,24 @@ webkit_web_frame_load_done_cb (WebKitWebFrame* web_frame,
                                gboolean        success,
                                MidoriView*     view)
 {
+    gchar* title;
     gchar* data;
 
     if (!success)
     {
-        /* Simply print a 404 error page on the fly. */
+        /* i18n: The title of the 404 - Not found error page */
+        title = g_strdup_printf (_("Not found - %s"), view->uri);
         data = g_strdup_printf (
-            "<html><head><title>Not found - %s</title></head>"
-            "<body><h1>Not found - %s</h1>"
+            "<html><head><title>%s</title></head>"
+            "<body><h1>%s</h1>"
             "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
             "style=\"position: absolute; right: 15px; bottom: 15px;\">"
             "<p />The page you were opening doesn't exist."
             "<p />Try to <a href=\"%s\">load the page again</a>, "
             "or move on to another page."
             "</body></html>",
-            view->uri, view->uri, view->uri);
+            title, title, view->uri);
+        g_free (title);
         webkit_web_view_load_html_string (
             WEBKIT_WEB_VIEW (view->web_view), data, view->uri);
         g_free (data);
@@ -1393,10 +1396,13 @@ midori_view_set_uri (MidoriView*  view,
             data = NULL;
             if (!strncmp (uri, "error:nodocs ", 13))
             {
+                gchar* title;
+
                 katze_assign (view->uri, g_strdup (&uri[13]));
+                title = g_strdup_printf (_("No documentation installed"));
                 data = g_strdup_printf (
-                    "<html><head><title>No documentation installed</title></head>"
-                    "<body><h1>No documentation installed</h1>"
+                    "<html><head><title>%s</title></head>"
+                    "<body><h1>%s</h1>"
                     "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
                     "style=\"position: absolute; right: 15px; bottom: 15px;\">"
                     "<p />There is no documentation installed at %s."
@@ -1404,7 +1410,8 @@ midori_view_set_uri (MidoriView*  view,
                     "package maintainer for it or if this a custom build "
                     "verify that the build is setup properly."
                     "</body></html>",
-                    view->uri);
+                    title, title, view->uri);
+                g_free (title);
             }
             if (data)
             {