From a4e6720fd71d80fd9c56116f7daafb06b2578d96 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 30 Nov 2008 02:08:28 +0100 Subject: [PATCH] Localization string improvements --- extensions/statusbar-features.c | 17 +++++++++++++++-- midori/main.c | 2 +- midori/midori-view.c | 21 ++++++++++++++------- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/extensions/statusbar-features.c b/extensions/statusbar-features.c index 88006c18..fb8cada1 100644 --- a/extensions/statusbar-features.c +++ b/extensions/statusbar-features.c @@ -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); diff --git a/midori/main.c b/midori/main.c index 2d042d71..4a18ae08 100644 --- a/midori/main.c +++ b/midori/main.c @@ -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) { diff --git a/midori/midori-view.c b/midori/midori-view.c index 6b09e13e..1cf76301 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -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 ( - "Not found - %s" - "

Not found - %s

" + "%s" + "

%s

" "" "

The page you were opening doesn't exist." "

Try to load the page again, " "or move on to another page." "", - 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 ( - "No documentation installed" - "

No documentation installed

" + "%s" + "

%s

" "" "

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." "", - view->uri); + title, title, view->uri); + g_free (title); } if (data) { -- 2.39.5