0

display: Improve wording in resolution change confirmation dialogue

Per requirements from PM, UX, UXW, this CL improves the wording used in
display resolution change confirmation dialogue.

Success: http://screen/A9Z9mnJeSHKgvDy.png
Fallback: http://screen/3WHjQD8cwCzawY4.png

Bug: b/325260200
Change-Id: I8f76abc3a97c215d078d54a5ae46e18b6c8b90a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5379807
Commit-Queue: Wenyu Zhang <zhangwenyu@google.com>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Wenyu Zhang <zhangwenyu@google.com>
Cr-Commit-Position: refs/heads/main@{#1275810}
This commit is contained in:
wenyu zhang
2024-03-20 20:33:42 +00:00
committed by Chromium LUCI CQ
parent 9dfa6101d1
commit b32853637c
11 changed files with 32 additions and 23 deletions

@ -3491,14 +3491,17 @@ Some features are limited to increase battery life.
<message name="IDS_ASH_RESOLUTION_CHANGE_DIALOG_FALLBACK" desc="The label used in the dialog to notify that the display resolution settings has changed to an unsupported resolution and the system falls back to another resolution.">
<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph> doesn't support <ph name="SPECIFIED_RESOLUTION">$2<ex>1920x1080</ex></ph>. The resolution was changed to <ph name="FALLBACK_RESOLUTION">$3<ex>1920x1200</ex></ph>. Click confirm to keep changes. The previous settings will be restored in <ph name="TIMEOUT_SECONDS">$4</ph>.
</message>
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE" desc="The title used in the dialog to notify that the display resolution settings has changed and asks the user to confirm the new resolution.">
Confirm Display Configuration
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE_FALLBACK" desc="The title used in the dialog to notify that the display resolution settings has changed and asks the user to confirm the new resolution. This is used when the resolution user requested is not supported.">
Confirm new resolution?
</message>
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED" desc="The label used in the dialog to notify that the display resolution settings has changed. Hz is the SI unit Hertz.">
<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph> changed to <ph name="RESOLUTION">$2<ex>2560x1600</ex></ph> (<ph name="REFRESH_RATE">$3<ex>60</ex></ph> Hz). Click confirm to keep changes. The previous settings will be restored in <ph name="TIMEOUT_SECONDS">$4</ph>.
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE_SUCCESS" desc="The title used in the dialog to notify that the display resolution settings has changed and asks the user to confirm the new resolution. This is used when the resolution user requested is supported.">
Confirm resolution?
</message>
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK" desc="The label used in the dialog to notify that the display resolution settings has changed to an unsupported resolution and the system falls back to another resolution. Hz is the SI unit Hertz.">
<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph> doesn't support <ph name="SPECIFIED_RESOLUTION">$2<ex>1920x1080</ex></ph> (<ph name="SPECIFIED_REFRESH_RATE">$3<ex>60</ex></ph> Hz). The resolution was changed to <ph name="FALLBACK_RESOLUTION">$4<ex>1920x1200</ex></ph> (<ph name="FALLBACK_REFRESH_RATE">$5<ex>30</ex></ph> Hz). Click confirm to keep changes. The previous settings will be restored in <ph name="TIMEOUT_SECONDS">$6</ph>.
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED_NEW" desc="The label used in the dialog to notify that the display resolution settings has changed. Hz is the SI unit Hertz.">
"<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph>" was changed to <ph name="RESOLUTION">$2<ex>3840x2160</ex></ph> (<ph name="REFRESH_RATE">$3<ex>60</ex></ph> Hz) resolution. Without confirming, the previous settings will be restored in <ph name="TIMEOUT_SECONDS">$4</ph>.
</message>
<message name="IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK_NEW" desc="The label used in the dialog to notify that the display resolution settings has changed to an unsupported resolution and the system falls back to another resolution. Hz is the SI unit Hertz.">
"<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph>" was changed to <ph name="FALLBACK_RESOLUTION">$2<ex>1920x1080</ex></ph> (<ph name="FALLBACK_REFRESH_RATE">$3<ex>60</ex></ph> Hz) resolution. Due to port bandwidth limitations, your display can't support a <ph name="SPECIFIED_RESOLUTION">$4<ex>3840x2160</ex></ph> (<ph name="SPECIFIED_REFRESH_RATE">$5<ex>60</ex></ph> Hz) resolution. Without confirming, the previous settings will be restored in <ph name="TIMEOUT_SECONDS">$6</ph>.
</message>
<message name="IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED_TO_UNSUPPORTED" desc="The label used in the tray to notify that the display resolution settings has changed to an unsupported resolution and the system falls back to another resolution.">
<ph name="DISPLAY_NAME">$1<ex>Google Monitor X</ex></ph> doesn't support <ph name="SPECIFIED_RESOLUTION">$2<ex>2560x1600</ex></ph>. The resolution was changed to <ph name="FALLBACK_RESOLUTION">$3<ex>1920x1200</ex></ph>.

@ -1 +0,0 @@
3794f7e2b23a44be23a1292d2ce520297add8158

@ -0,0 +1 @@
ae9befea739ad610c9871c1498da329938f3ce04

@ -1 +0,0 @@
bfd364acc62b49d7cd5cfd6e9e59197e11cbb7d5

@ -0,0 +1 @@
66eeb3edad2916a3d6383934b8499719eea9fd64

@ -1 +0,0 @@
e541f9c1457cc5c0371cf0df0e87eab08930a74c

@ -0,0 +1 @@
ea4b4ba79c2ed21f22938d2ea21f66212c3dd28b

@ -0,0 +1 @@
88a82ecdc4d78a7ade21e9d3f2a4f6acbf5285c2

@ -48,6 +48,7 @@ DisplayChangeDialog::DisplayChangeDialog(
label_ =
AddChildView(std::make_unique<views::Label>(GetRevertTimeoutString()));
label_->SetMultiLine(true);
label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT);
views::Widget* widget = CreateDialogWidget(
this, nullptr,

@ -155,9 +155,6 @@ void ResolutionNotificationController::CreateOrReplaceModalDialog() {
std::u16string timeout_message_with_placeholder;
if (display::features::IsListAllDisplayModesEnabled()) {
dialog_title = l10n_util::GetStringUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE);
const std::u16string actual_refresh_rate = ConvertRefreshRateToString16(
change_info_->current_resolution.refresh_rate());
const std::u16string requested_refresh_rate = ConvertRefreshRateToString16(
@ -166,16 +163,23 @@ void ResolutionNotificationController::CreateOrReplaceModalDialog() {
const bool no_fallback = actual_display_size == requested_display_size &&
actual_refresh_rate == requested_refresh_rate;
dialog_title =
no_fallback
? l10n_util::GetStringUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE_SUCCESS)
: l10n_util::GetStringUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE_FALLBACK);
timeout_message_with_placeholder =
no_fallback ? l10n_util::GetStringFUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED,
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED_NEW,
display_name, actual_display_size,
actual_refresh_rate, kTimeoutPlaceHolder)
: l10n_util::GetStringFUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK,
{display_name, requested_display_size,
requested_refresh_rate, actual_display_size,
actual_refresh_rate, kTimeoutPlaceHolder},
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK_NEW,
{display_name, actual_display_size,
actual_refresh_rate, requested_display_size,
requested_refresh_rate, kTimeoutPlaceHolder},
/*offsets=*/nullptr);
} else {

@ -50,7 +50,7 @@ class ResolutionNotificationControllerTest
base::Seconds(timeout_count));
if (::display::features::IsListAllDisplayModesEnabled()) {
return l10n_util::GetStringFUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED, display_name,
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_CHANGED_NEW, display_name,
base::UTF8ToUTF16(new_resolution.ToString()),
ConvertRefreshRateToString16(new_refresh_rate), countdown);
}
@ -73,11 +73,11 @@ class ResolutionNotificationControllerTest
base::Seconds(timeout_count));
if (::display::features::IsListAllDisplayModesEnabled()) {
return l10n_util::GetStringFUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK,
{display_name, base::UTF8ToUTF16(specified_resolution.ToString()),
ConvertRefreshRateToString16(specified_refresh_rate),
base::UTF8ToUTF16(fallback_resolution.ToString()),
ConvertRefreshRateToString16(fallback_refresh_rate), countdown},
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_FALLBACK_NEW,
{display_name, base::UTF8ToUTF16(fallback_resolution.ToString()),
ConvertRefreshRateToString16(fallback_refresh_rate),
base::UTF8ToUTF16(specified_resolution.ToString()),
ConvertRefreshRateToString16(specified_refresh_rate), countdown},
/*offsets=*/nullptr);
}
return l10n_util::GetStringFUTF16(