diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 13:51:20 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-20 13:51:20 +0000 |
commit | b85e5120573c61b9bdd492fb903b334bf1119d8f (patch) | |
tree | f2a8827c9baa9fe6b2b8a7dd9264a0592d2a4400 | |
parent | db54628ea7875c034c153a71fee1c7c9ab83f8ed (diff) | |
download | chromium_src-b85e5120573c61b9bdd492fb903b334bf1119d8f.zip chromium_src-b85e5120573c61b9bdd492fb903b334bf1119d8f.tar.gz chromium_src-b85e5120573c61b9bdd492fb903b334bf1119d8f.tar.bz2 |
Adds Linux error text for when there is no internet connection
(ERR_INTERNET_DISCONNECTED).
Unlike OSX or Windows, no instructions are given under Linux.
Note that ERR_INTERNET_DISCONNECTED is currently only generated under Windows.
BUG=56457
TEST=manual
Review URL: http://codereview.chromium.org/3763009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63207 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/generated_resources.grd | 10 | ||||
-rw-r--r-- | chrome/renderer/localized_error.cc | 21 |
2 files changed, 14 insertions, 17 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 110bdf7..b5048c8 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -5754,14 +5754,19 @@ Keep your key file in a safe place. You will need it to create new versions of y perform this interception. Click the 'Learn more' link for instructions. </message> - <message name="IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED" desc="Summary of the error page when the network connection failed, before platform dependent instructions."> + <message name="IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED" desc="Summary of the error page when the network connection failed. May be followed by platform dependent instructions."> <ph name="PRODUCT_NAME"><span jscontent="productName"></span><ex>Google Chrome</ex></ph> can’t display the webpage because your computer isn’t connected to the internet. + </message> + <message name="IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE" desc="Template for the summary of the error page when the network connection failed, on platforms with instructions."> + <ph name="ERROR_DESCRIPTION_TEXT"> + $1<ex>Google Chrome can’t display the webpage because your computer isn’t connected to the internet.</ex> + </ph> <ph name="LINE_BREAK"><br /><br /></ph> You can try to diagnose the problem by taking the following steps: <ph name="LINE_BREAK"><br /><br /></ph> <ph name="PLATFORM_TEXT"> - $1<ex>Goto the wrench menu and choose Fix It.</ex> + $2<ex>Goto the wrench menu and choose Fix It.</ex> </ph> </message> @@ -5774,7 +5779,6 @@ Keep your key file in a safe place. You will need it to create new versions of y to test your connection. </message> </if> - <!-- TODO(mmenke): Add Linux instructions --> <if expr="os != 'darwin' and os != 'linux2'"> <message name="IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM" desc="Summary (platform dependent section) in the error page when the network connection failed. Describes how to get to the network Diagnostics screen under Windows 7 and later."> Go to diff --git a/chrome/renderer/localized_error.cc b/chrome/renderer/localized_error.cc index da06d7a..c9a2a67 100644 --- a/chrome/renderer/localized_error.cc +++ b/chrome/renderer/localized_error.cc @@ -142,9 +142,6 @@ const LocalizedErrorMap net_error_options[] = { IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR, SUGGEST_LEARNMORE, }, - // TODO(mmenke): Once Linux-specific instructions are added, remove this - // conditional, and the one further down as well. -#if defined(OS_MACOSX) || defined(OS_WIN) {net::ERR_INTERNET_DISCONNECTED, IDS_ERRORPAGES_TITLE_INTERNET_DISCONNECTED, IDS_ERRORPAGES_HEADING_INTERNET_DISCONNECTED, @@ -152,15 +149,6 @@ const LocalizedErrorMap net_error_options[] = { IDS_ERRORPAGES_DETAILS_INTERNET_DISCONNECTED, SUGGEST_NONE, }, -#else - {net::ERR_INTERNET_DISCONNECTED, - IDS_ERRORPAGES_TITLE_NOT_AVAILABLE, - IDS_ERRORPAGES_HEADING_NOT_AVAILABLE, - IDS_ERRORPAGES_SUMMARY_NOT_AVAILABLE, - IDS_ERRORPAGES_DETAILS_INTERNET_DISCONNECTED, - SUGGEST_NONE, - }, -#endif }; const LocalizedErrorMap http_error_options[] = { @@ -379,6 +367,8 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error, IDS_ERRORPAGES_SUMMARY_PROXY_CONNECTION_FAILED_PLATFORM))); } + // Platform specific instructions for diagnosing network issues on OSX and + // Windows. #if defined(OS_MACOSX) || defined(OS_WIN) if (error_domain == net::kErrorDomain && error_code == net::ERR_INTERNET_DISCONNECTED) { @@ -399,9 +389,12 @@ void LocalizedError::GetStrings(const WebKit::WebURLError& error, IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM_VISTA; } #endif // defined(OS_WIN) - // Suffix the platform dependent portion of the summary section. + // Lead with the general error description, and suffix with the platform + // dependent portion of the summary section. summary->SetString("msg", - l10n_util::GetStringFUTF16(options.summary_resource_id, + l10n_util::GetStringFUTF16( + IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE, + l10n_util::GetStringUTF16(options.summary_resource_id), l10n_util::GetStringUTF16(platform_string_id))); } #endif // defined(OS_MACOSX) || defined(OS_WIN) |