Localization string improvements

This commit is contained in:
Christian Dywan 2008-11-30 02:08:28 +01:00
parent c2c031e041
commit a4e6720fd7
3 changed files with 30 additions and 10 deletions

View file

@ -27,11 +27,24 @@ statusbar_features_app_add_browser_cb (MidoriApp* app,
bbox = gtk_hbox_new (FALSE, 0); bbox = gtk_hbox_new (FALSE, 0);
settings = katze_object_get_object (browser, "settings"); settings = katze_object_get_object (browser, "settings");
button = katze_property_proxy (settings, "auto-load-images", NULL); 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_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 2);
gtk_widget_show (button); gtk_widget_show (button);
button = katze_property_proxy (settings, "enable-scripts", NULL); 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_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 2);
gtk_widget_show (button); gtk_widget_show (button);
gtk_widget_show (bbox); gtk_widget_show (bbox);

View file

@ -1308,7 +1308,7 @@ main (int argc,
GTK_MESSAGE_DIALOG (dialog), "%s", error_messages->str); GTK_MESSAGE_DIALOG (dialog), "%s", error_messages->str);
gtk_dialog_add_buttons (GTK_DIALOG (dialog), gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
"_Ignore", GTK_RESPONSE_ACCEPT, _("_Ignore"), GTK_RESPONSE_ACCEPT,
NULL); NULL);
if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT) if (gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_ACCEPT)
{ {

View file

@ -542,21 +542,24 @@ webkit_web_frame_load_done_cb (WebKitWebFrame* web_frame,
gboolean success, gboolean success,
MidoriView* view) MidoriView* view)
{ {
gchar* title;
gchar* data; gchar* data;
if (!success) 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 ( data = g_strdup_printf (
"<html><head><title>Not found - %s</title></head>" "<html><head><title>%s</title></head>"
"<body><h1>Not found - %s</h1>" "<body><h1>%s</h1>"
"<img src=\"file://" DATADIR "/midori/logo-shade.png\" " "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
"style=\"position: absolute; right: 15px; bottom: 15px;\">" "style=\"position: absolute; right: 15px; bottom: 15px;\">"
"<p />The page you were opening doesn't exist." "<p />The page you were opening doesn't exist."
"<p />Try to <a href=\"%s\">load the page again</a>, " "<p />Try to <a href=\"%s\">load the page again</a>, "
"or move on to another page." "or move on to another page."
"</body></html>", "</body></html>",
view->uri, view->uri, view->uri); title, title, view->uri);
g_free (title);
webkit_web_view_load_html_string ( webkit_web_view_load_html_string (
WEBKIT_WEB_VIEW (view->web_view), data, view->uri); WEBKIT_WEB_VIEW (view->web_view), data, view->uri);
g_free (data); g_free (data);
@ -1393,10 +1396,13 @@ midori_view_set_uri (MidoriView* view,
data = NULL; data = NULL;
if (!strncmp (uri, "error:nodocs ", 13)) if (!strncmp (uri, "error:nodocs ", 13))
{ {
gchar* title;
katze_assign (view->uri, g_strdup (&uri[13])); katze_assign (view->uri, g_strdup (&uri[13]));
title = g_strdup_printf (_("No documentation installed"));
data = g_strdup_printf ( data = g_strdup_printf (
"<html><head><title>No documentation installed</title></head>" "<html><head><title>%s</title></head>"
"<body><h1>No documentation installed</h1>" "<body><h1>%s</h1>"
"<img src=\"file://" DATADIR "/midori/logo-shade.png\" " "<img src=\"file://" DATADIR "/midori/logo-shade.png\" "
"style=\"position: absolute; right: 15px; bottom: 15px;\">" "style=\"position: absolute; right: 15px; bottom: 15px;\">"
"<p />There is no documentation installed at %s." "<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 " "package maintainer for it or if this a custom build "
"verify that the build is setup properly." "verify that the build is setup properly."
"</body></html>", "</body></html>",
view->uri); title, title, view->uri);
g_free (title);
} }
if (data) if (data)
{ {