Commit 083f1c17 authored by danielng's avatar danielng Committed by Commit Bot

borealis: string changes for installer errors

Changing some strings to better portray errors to users and advise
them of what steps they can take next. Both of these are DLC related.
One relates to an error that can occur when a user tries to install
borealis, cancels and tries to install again (before the last
installation has finalized its cancellation). The other relates to the
DLC "Catch-all" error message, where sometimes if users just retry,
the installation will succeed.

Bug: b/171672034, b/172284265
Change-Id: I17ef2028cab27361ec42e0ab581e828d83c72f09
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544322Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarNic Hollingum <hollingum@google.com>
Commit-Queue: Daniel Ng <danielng@google.com>
Cr-Commit-Position: refs/heads/master@{#828437}
parent be07b7eb
...@@ -5592,7 +5592,7 @@ ...@@ -5592,7 +5592,7 @@
Your device is offline, please connect to the internet and try again. Your device is offline, please connect to the internet and try again.
</message> </message>
<message name="IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE" desc="" translateable="false"> <message name="IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE" desc="" translateable="false">
Your device needs to be updated before you can use <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph>. Something went wrong. Ensure that your device is up to date and please try again.
</message> </message>
<message name="IDS_BOREALIS_DLC_BUSY_FAILED_MESSAGE" desc="" translateable="false"> <message name="IDS_BOREALIS_DLC_BUSY_FAILED_MESSAGE" desc="" translateable="false">
Something went wrong. Please wait a few minutes and run <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph> again. Something went wrong. Please wait a few minutes and run <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph> again.
...@@ -5606,6 +5606,9 @@ ...@@ -5606,6 +5606,9 @@
<message name="IDS_BOREALIS_GENERIC_ERROR_MESSAGE" desc="" translateable="false"> <message name="IDS_BOREALIS_GENERIC_ERROR_MESSAGE" desc="" translateable="false">
Couldn't install <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph>. Please try again later. Error code: <ph name="ERROR_CODE">$2<ex>7</ex></ph>. Couldn't install <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph>. Please try again later. Error code: <ph name="ERROR_CODE">$2<ex>7</ex></ph>.
</message> </message>
<message name="IDS_BOREALIS_INSTALLER_IN_PROGRESS_ERROR_MESSAGE" desc="" translateable="false">
Couldn't install <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph>. Another process is already trying to install <ph name="APP_NAME">$1<ex>BOREALIS</ex></ph> or hasn't finished cancelling. Please try again later.
</message>
<!-- <!--
================================================================================== ==================================================================================
If you change any IDS_EDU_LOGIN_INFO_* string, update kConsentScreenTextVersion in If you change any IDS_EDU_LOGIN_INFO_* string, update kConsentScreenTextVersion in
......
...@@ -287,9 +287,7 @@ base::string16 BorealisInstallerView::GetSecondaryMessage() const { ...@@ -287,9 +287,7 @@ base::string16 BorealisInstallerView::GetSecondaryMessage() const {
default: default:
case ResultEnum::kBorealisInstallInProgress: case ResultEnum::kBorealisInstallInProgress:
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
IDS_BOREALIS_GENERIC_ERROR_MESSAGE, app_name_, IDS_BOREALIS_INSTALLER_IN_PROGRESS_ERROR_MESSAGE, app_name_);
base::NumberToString16(
static_cast<std::underlying_type_t<ResultEnum>>(*result_)));
case ResultEnum::kBorealisNotAllowed: case ResultEnum::kBorealisNotAllowed:
case ResultEnum::kDlcUnsupportedError: case ResultEnum::kDlcUnsupportedError:
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
...@@ -301,8 +299,8 @@ base::string16 BorealisInstallerView::GetSecondaryMessage() const { ...@@ -301,8 +299,8 @@ base::string16 BorealisInstallerView::GetSecondaryMessage() const {
IDS_BOREALIS_INSTALLER_OFFLINE_MESSAGE); IDS_BOREALIS_INSTALLER_OFFLINE_MESSAGE);
// DLC Failures. // DLC Failures.
case ResultEnum::kDlcInternalError: case ResultEnum::kDlcInternalError:
return l10n_util::GetStringFUTF16( return l10n_util::GetStringUTF16(
IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE, app_name_); IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE);
case ResultEnum::kDlcBusyError: case ResultEnum::kDlcBusyError:
return l10n_util::GetStringFUTF16( return l10n_util::GetStringFUTF16(
IDS_BOREALIS_DLC_BUSY_FAILED_MESSAGE, app_name_); IDS_BOREALIS_DLC_BUSY_FAILED_MESSAGE, app_name_);
......
...@@ -220,10 +220,7 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, ...@@ -220,10 +220,7 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest,
ExpectInstallationFailedWithRetry(); ExpectInstallationFailedWithRetry();
EXPECT_EQ(view_->GetSecondaryMessage(), EXPECT_EQ(view_->GetSecondaryMessage(),
l10n_util::GetStringFUTF16( l10n_util::GetStringFUTF16(
IDS_BOREALIS_GENERIC_ERROR_MESSAGE, app_name_, IDS_BOREALIS_INSTALLER_IN_PROGRESS_ERROR_MESSAGE, app_name_));
base::NumberToString16(
static_cast<std::underlying_type_t<InstallationResult>>(
error_type))));
AcceptInstallation(); AcceptInstallation();
...@@ -247,10 +244,7 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, InProgressError) { ...@@ -247,10 +244,7 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, InProgressError) {
ExpectInstallationFailedWithRetry(); ExpectInstallationFailedWithRetry();
EXPECT_EQ(view_->GetSecondaryMessage(), EXPECT_EQ(view_->GetSecondaryMessage(),
l10n_util::GetStringFUTF16( l10n_util::GetStringFUTF16(
IDS_BOREALIS_GENERIC_ERROR_MESSAGE, app_name_, IDS_BOREALIS_INSTALLER_IN_PROGRESS_ERROR_MESSAGE, app_name_));
base::NumberToString16(
static_cast<std::underlying_type_t<InstallationResult>>(
error_type))));
ClickCancel(); ClickCancel();
} }
...@@ -279,9 +273,9 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, DlcInternalError) { ...@@ -279,9 +273,9 @@ IN_PROC_BROWSER_TEST_F(BorealisInstallerViewBrowserTest, DlcInternalError) {
view_->OnInstallationEnded(error_type); view_->OnInstallationEnded(error_type);
ExpectInstallationFailedWithRetry(); ExpectInstallationFailedWithRetry();
EXPECT_EQ(view_->GetSecondaryMessage(), EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE, view_->GetSecondaryMessage(),
app_name_)); l10n_util::GetStringUTF16(IDS_BOREALIS_DLC_INTERNAL_FAILED_MESSAGE));
ClickCancel(); ClickCancel();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment