From 4e170744b831886db9b98ef1260e749df36a79af Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 25 May 2012 18:22:55 +0200 Subject: New rekonq error page :) --- src/webpage.cpp | 77 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 61 insertions(+), 16 deletions(-) (limited to 'src/webpage.cpp') diff --git a/src/webpage.cpp b/src/webpage.cpp index cbf1f573..ff993121 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -585,37 +585,82 @@ QString WebPage::errorPage(QNetworkReply *reply) // 2. title QString title = i18n("There was a problem while loading the page"); - QString iconPath = QString("file://") + KIconLoader::global()->iconPath("dialog-warning" , KIconLoader::Small); - iconPath.replace(QL1S("16"), QL1S("128")); - // 3. main content QString msg; + + msg += i18n("

Oops! Rekonq cannot load %1

", urlString); + + + msg += i18n("

Wrong digited?

"); + msg += QL1S(""); msg += QL1S("
"); - msg += QL1S(""); + + msg += i18n("

"); + msg += i18n("We tried to load url: %1.
", urlString); + msg += i18n("Check your address for errors like ww.kde.org instead of www.kde.org.
"); + msg += i18n("If you digited it right, just try to reload it.
", urlString); + msg += i18n("Otherwise, just take attention on next attempt."); + msg += i18n("

"); + + QString laughIconPath = QString("file://") + KIconLoader::global()->iconPath("face-laugh" , -KIconLoader::SizeHuge, false); msg += QL1S("
"); - msg += QL1S("

") + reply->errorString() + QL1S("

"); - msg += QL1S("

") + i18nc("%1=an URL, e.g.'kde.org'", "When connecting to: %1", urlString) + QL1S("

"); + msg += QL1S(""); + msg += QL1S("
"); + + + msg += i18n("

Network problems?

"); + + QString faceIconPath = QString("file://") + KIconLoader::global()->iconPath("face-surprise" , -KIconLoader::SizeHuge, false); + msg += QL1S(""); + msg += QL1S("
"); + msg += QL1S(""); + msg += QL1S(""); + + msg += i18n("

"); + msg += i18n("Maybe you are having some problems with your network.
"); + msg += i18n("Try checking your network connections", QL1S("about:settings/network")); + msg += i18n(", your proxy settings ", QL1S("about:settings/proxy")); + msg += i18n("and your firewall.
", QL1S("about:settings/firewall")); + msg += i18n("Then try again.
"); + msg += i18n("

"); + msg += QL1S("
"); - msg += QL1S("

"); - msg += QL1S(""); - //Default SearchEngine + msg += i18n("

Suggestions

"); + + msg += QL1S(""); + msg += QL1S("
"); + + msg += i18n("

"); + + // Default SearchEngine KService::Ptr defaultEngine = SearchEngine::defaultEngine(); if (defaultEngine) { - msg += i18n("or"); + msg += i18n("Consult your default search engine about:"); msg += QL1S(" "); - msg += i18n("Search with %1", defaultEngine->name()) + QL1S(""); + msg += i18n("search with %1", defaultEngine->name()); + msg += QL1S("!
"); + } + else + { + msg += i18n("You don't have a default search engine set. We won't suggest you one."); } + msg += i18n("At least, you can consult a cached snapshot of the site:
"); + msg += i18n("Try checking the Wayback Machine", QL1S("http://wayback.archive.org/web/*/") + urlString); + msg += i18n(" or the Google Cache.", QL1S("http://google.com/search?q=cache:") + urlString); + msg += i18n("

"); + + QString winkIconPath = QString("file://") + KIconLoader::global()->iconPath("face-wink" , -KIconLoader::SizeHuge, false); + msg += QL1S("
"); + msg += QL1S(""); + msg += QL1S("
"); + + // done. Replace variables and show it QString html = QL1S(file.readAll()); -- cgit v1.2.1