diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-24 02:01:24 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-24 02:01:24 +0200 |
commit | 9c086fcd342910b5e60f80c7bc893dfbe2591418 (patch) | |
tree | 84037e78174f2b11ef471149130212121b7ae02e /src | |
parent | css homepage improvements (diff) | |
download | rekonq-9c086fcd342910b5e60f80c7bc893dfbe2591418.tar.xz |
Fixed not found page to let translators work on it..
Diffstat (limited to 'src')
-rw-r--r-- | src/webpage.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/webpage.cpp b/src/webpage.cpp index d5d1cd7c..7408b490 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -224,15 +224,27 @@ QString WebPage::errorPage(QNetworkReply *reply) kWarning() << "Couldn't open the notfound.html file"; return QString(""); } - QString title = i18n("Error loading page: ") + reply->url().toString(); - QString imagePath = KIconLoader::global()->iconPath("rekonq", KIconLoader::NoGroup, false); + QString title = i18n("Error loading: ") + reply->url().path(); + + QString imagesPath = QString("file://") + KGlobal::dirs()->findResourceDir("data", "rekonq/pics/bg.png") + QString("rekonq/pics"); + QString msg = "<h1>" + reply->errorString() + "</h1>"; + + msg += "<h2>" + i18n("When connecting to: ") + reply->url().toString() + "</h2>"; + msg += "<ul><li>" + i18n("Check the address for errors such as <b>ww</b>.kde.org instead of <b>www</b>.kde.org"); + msg += "</li><li>" + i18n("If the address is correct, try to check the network connection.") + "</li><li>" ; + msg += i18n("If your computer or network is protected by a firewall or proxy, make sure that rekonq is permitted to access the network."); + msg += "</li><li>" + i18n("Of course, if rekonq doesn't work properly, you can always say it's a programmer error ;)"); + msg += "</li></ul><br/><br/>"; + msg += "<input type=\"button\" id=\"reloadButton\" onClick=\"document.location.href='" + reply->url().path() + "';\" value=\""; + msg += i18n("Try Again") + "\" />"; + QString html = QString(QLatin1String(file.readAll())) .arg(title) - .arg("file://" + imagePath) - .arg(reply->errorString()) - .arg(reply->url().toString()); + .arg(imagesPath) + .arg(msg) + ; return html; } |