guint port;
gchar* res_root;
gchar* stock_root;
+ gchar* title;
gchar* message;
gchar* result;
res_root = g_strdup_printf ("http://localhost:%d/res", port);
stock_root = g_strdup_printf ("http://localhost:%d/stock", port);
+ title = g_strdup_printf (_("Error - %s"), uri);
message = g_strdup_printf (_("The page '%s' couldn't be loaded."), uri);
result = sokoke_replace_variables (template,
- "{title}", _("Error"),
+ "{title}", title,
"{message}", message,
"{description}", error->message,
"{tryagain}", _("Try again"),
NULL);
g_free (template);
g_free (message);
+ g_free (title);
webkit_web_frame_load_alternate_string (web_frame,
result, res_root, uri);
#if WEBKIT_CHECK_VERSION (1, 1, 6)
/* WebKit 1.1.6 doesn't handle "alternate content" flawlessly,
so reloading via Javascript works but not via API calls. */
- title = g_strdup (_("Error"));
+ title = g_strdup_printf (_("Error - %s"), view->uri);
#else
/* Error pages are special, we want to try loading the destination
again, not the error page which isn't even a proper page */
- title = g_strdup_printf (_("Not found - %s"), view->uri);
+ title = g_strdup_printf (_("Error - %s"), view->uri);
#endif
if (view->title && strstr (title, view->title))
webkit_web_view_open (WEBKIT_WEB_VIEW (view->web_view), view->uri);