Update the update notification strings
Change to the new titles and messages based on the "pinned notification" in go/notifier-catalogue. BUG=b:327483977 TEST=CQ Change-Id: I835126155aa44ba982a3ad63259227ae0e686b45 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5576745 Reviewed-by: Jiaming Cheng <jiamingc@chromium.org> Reviewed-by: Toni Barzic <tbarzic@chromium.org> Commit-Queue: Yuanpeng Ni <yuanpengni@chromium.org> Cr-Commit-Position: refs/heads/main@{#1308113}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c7a6eab646
commit
aed9f958d7
ash
ash_strings.grd
ash_strings_grd
IDS_RELAUNCH_RECOMMENDED_BODY.png.sha1IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY.png.sha1IDS_RELAUNCH_RECOMMENDED_OVERDUE_TITLE.png.sha1IDS_RELAUNCH_REQUIRED_BODY.png.sha1IDS_ROLLBACK_NOTIFICATION_TITLE.png.sha1IDS_ROLLBACK_OVERDUE_NOTIFICATION_TITLE.png.sha1IDS_ROLLBACK_REQUIRED_TITLE_DAYS.png.sha1IDS_ROLLBACK_REQUIRED_TITLE_HOURS.png.sha1IDS_ROLLBACK_REQUIRED_TITLE_MINUTES.png.sha1IDS_ROLLBACK_REQUIRED_TITLE_SECONDS.png.sha1IDS_UPDATE_NOTIFICATION_TITLE.png.sha1
system
@ -924,13 +924,13 @@ Style notes:
|
||||
</message>
|
||||
|
||||
<message name="IDS_UPDATE_NOTIFICATION_TITLE" desc="The title of the notification to notify that the user should restart to get system updates.">
|
||||
Update available
|
||||
Update device
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_NOTIFICATION_TITLE" desc="The title of the notification to notify that the user should restart to roll back the device.">
|
||||
Device needs to go back to previous version
|
||||
Update device to previous version
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_OVERDUE_NOTIFICATION_TITLE" desc="The title of the notification to notify that the user should restart to roll back the device and the admin recommended to restart.">
|
||||
Device change to previous version is overdue
|
||||
Update device to previous version
|
||||
</message>
|
||||
|
||||
<!-- `FeatureTile` downloading states -->
|
||||
@ -967,29 +967,29 @@ Style notes:
|
||||
other {Update device within # seconds}}
|
||||
</message>
|
||||
<message name="IDS_RELAUNCH_REQUIRED_BODY" desc="The body text of a dialog that tells users the device must be restarted. MANAGER can be a domain or an email address.">
|
||||
<ph name="MANAGER">$1<ex>google.com</ex></ph> requires you to update your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> before the deadline
|
||||
Update required by <ph name="MANAGER">$1<ex>google.com</ex></ph>
|
||||
</message>
|
||||
|
||||
<message name="IDS_ROLLBACK_REQUIRED_TITLE_DAYS" desc="The title of a dialog that tells users the device must be restarted to roll back to an earlier version within days. The device will be wiped on restart.">
|
||||
{0, plural,
|
||||
=1 {Change device to previous version within a day}
|
||||
other {Change device to previous version within # days}}
|
||||
=1 {Update device to previous version within a day}
|
||||
other {Update device to previous version within # days}}
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_REQUIRED_TITLE_HOURS" desc="The title of a dialog that tells users the device must be restarted to roll back to an earlier version within hours. The device will be wiped on restart.">
|
||||
{0, plural,
|
||||
=1 {Change device to previous version within an hour}
|
||||
other {Change device to previous version within # hours}}
|
||||
=1 {Update device to previous version within an hour}
|
||||
other {Update device to previous version within # hours}}
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_REQUIRED_TITLE_MINUTES" desc="The title of a dialog that tells users the device must be restarted to roll back to an earlier version within minutes. The device will be wiped on restart.">
|
||||
{0, plural,
|
||||
=1 {Change device to previous version within 1 minute}
|
||||
other {Change device to previous version within # minutes}}
|
||||
=1 {Update device to previous version within 1 minute}
|
||||
other {Update device to previous version within # minutes}}
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_REQUIRED_TITLE_SECONDS" desc="The title of a dialog that tells users the device must be restarted to roll back to an earlier version within seconds. The device will be wiped on restart.">
|
||||
{0, plural,
|
||||
=0 {Change device to previous version now}
|
||||
=1 {Change device to previous version within 1 second}
|
||||
other {Change device to previous version within # seconds}}
|
||||
=0 {Update device to previous version now}
|
||||
=1 {Update device to previous version within 1 second}
|
||||
other {Update device to previous version within # seconds}}
|
||||
</message>
|
||||
<message name="IDS_ROLLBACK_REQUIRED_BODY" desc="The body text of a dialog that tells users the device must be restarted to roll back to an earlier version within a deadline given in the title of the message. The device will be wiped on restart. MANAGER can be a domain or an email address.">
|
||||
<ph name="MANAGER">$1<ex>google.com</ex></ph> requires you to roll back your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>. Your device will reset and all data will be deleted.
|
||||
@ -999,13 +999,13 @@ Style notes:
|
||||
Update available
|
||||
</message>
|
||||
<message name="IDS_RELAUNCH_RECOMMENDED_OVERDUE_TITLE" desc="The title of a dialog that tells users that a device restart had been recommended for an update.">
|
||||
Update overdue
|
||||
Device not up to date
|
||||
</message>
|
||||
<message name="IDS_RELAUNCH_RECOMMENDED_BODY" desc="The body text of a dialog that tells users the device must be restarted. MANAGER can be a domain or an email address.">
|
||||
<ph name="MANAGER">$1<ex>google.com</ex></ph> recommends that you update your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>
|
||||
Update required by <ph name="MANAGER">$1<ex>google.com</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY" desc="The body text of a dialog that tells users the device must be restarted right now. MANAGER can be a domain or an email address.">
|
||||
<ph name="MANAGER">$1<ex>google.com</ex></ph> requires you to update your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> immediately
|
||||
Update required by <ph name="MANAGER">$1<ex>google.com</ex></ph>
|
||||
</message>
|
||||
<message name="IDS_UPDATE_NOTIFICATION_MESSAGE_LEARN_MORE" desc="The body of the notification to notify that the user should restart to get system updates. This notification body links to the info page on the update.">
|
||||
Learn more about the latest <ph name="SYSTEM_APP_NAME">$1<ex>ChromiumOS</ex></ph> update
|
||||
|
@ -1 +1 @@
|
||||
92765d7290a890fd68ca29a0400c3abaf2c44717
|
||||
c3adba92ec5baa3e08b0fa487d94dca7555a882c
|
@ -1 +1 @@
|
||||
3b03ec5656219dd80d23a24a97b3f84e3cea4e85
|
||||
bb1e9427870087c98f517a0f42bc154f2d26bba0
|
@ -1 +1 @@
|
||||
8bbf09ff39bdb507669579d145c0cad6d8dcb1d0
|
||||
be233572590d1a07c5e78fcf2b12404847635b89
|
@ -1 +1 @@
|
||||
1973a7fe2d47a0b484be8c4e87d2168b59319fc3
|
||||
3721225ffa8d31a15b28a79bb8eec75647ab0180
|
@ -1 +1 @@
|
||||
d0b23ad0e5fb5690e4d3d762d81353544f9f3a04
|
||||
c21f60ee45af6ba3ac6ee46b1b237aba95a21ecf
|
@ -1 +1 @@
|
||||
3cdf279d3bca062cf67f37609bd4366187e79aad
|
||||
d3d961e412db7761383999ab192486c6bee68147
|
@ -1 +1 @@
|
||||
4a7cfbbb582cf6bc93098d1d5ead43a722993a0f
|
||||
5224a3e2f1c6ee786fc7cb7742c8babf0991cc9a
|
@ -1 +1 @@
|
||||
c86457d0279e44eb5301ba8b1997be25fc4fca93
|
||||
5224a3e2f1c6ee786fc7cb7742c8babf0991cc9a
|
@ -1 +1 @@
|
||||
7ba81c760aad0b77a62e92ec0fecef9955318535
|
||||
5224a3e2f1c6ee786fc7cb7742c8babf0991cc9a
|
@ -1 +1 @@
|
||||
30704379921115092223b1c60814a007d594fc7f
|
||||
5224a3e2f1c6ee786fc7cb7742c8babf0991cc9a
|
@ -0,0 +1 @@
|
||||
1538bc0224fdb16e5c2801034b3572ecbb6a63d1
|
@ -236,8 +236,13 @@ std::u16string UpdateNotificationController::GetMessage() const {
|
||||
std::u16string domain_manager =
|
||||
GetDomainManager(model_->relaunch_notification_state().policy_source);
|
||||
if (body_message_id.has_value() && !domain_manager.empty()) {
|
||||
update_text = l10n_util::GetStringFUTF16(*body_message_id, domain_manager,
|
||||
ui::GetChromeOSDeviceName());
|
||||
if (model_->rollback()) {
|
||||
update_text = l10n_util::GetStringFUTF16(*body_message_id, domain_manager,
|
||||
ui::GetChromeOSDeviceName());
|
||||
} else {
|
||||
update_text =
|
||||
l10n_util::GetStringFUTF16(*body_message_id, domain_manager);
|
||||
}
|
||||
} else {
|
||||
update_text = l10n_util::GetStringFUTF16(
|
||||
IDS_UPDATE_NOTIFICATION_MESSAGE_LEARN_MORE, system_app_name);
|
||||
|
@ -177,7 +177,7 @@ TEST_F(UpdateNotificationControllerTest, VisibilityAfterUpdate) {
|
||||
/*expected_color_id_for_jelly=*/cros_tokens::kCrosSysPrimary);
|
||||
EXPECT_TRUE(strcmp(kSystemMenuUpdateIcon.name, GetNotificationIcon().name) ==
|
||||
0);
|
||||
EXPECT_EQ("Update available", GetNotificationTitle());
|
||||
EXPECT_EQ("Update device", GetNotificationTitle());
|
||||
EXPECT_EQ("Learn more about the latest " +
|
||||
base::UTF16ToUTF8(system_app_name_) + " update",
|
||||
GetNotificationMessage());
|
||||
@ -214,7 +214,7 @@ TEST_F(UpdateNotificationControllerTest, VisibilityAfterUpdateWithSlowReboot) {
|
||||
/*expected_color_id_for_jelly=*/cros_tokens::kCrosSysPrimary);
|
||||
EXPECT_TRUE(strcmp(kSystemMenuUpdateIcon.name, GetNotificationIcon().name) ==
|
||||
0);
|
||||
EXPECT_EQ("Update available", GetNotificationTitle());
|
||||
EXPECT_EQ("Update device", GetNotificationTitle());
|
||||
EXPECT_EQ("Learn more about the latest " +
|
||||
base::UTF16ToUTF8(system_app_name_) +
|
||||
" update. This Chromebook needs to restart to apply an update. "
|
||||
@ -261,7 +261,7 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
/*expected_color_id_for_jelly=*/cros_tokens::kCrosSysPrimary);
|
||||
EXPECT_TRUE(strcmp(kSystemMenuUpdateIcon.name, GetNotificationIcon().name) ==
|
||||
0);
|
||||
EXPECT_EQ("Update available", GetNotificationTitle());
|
||||
EXPECT_EQ("Update device", GetNotificationTitle());
|
||||
EXPECT_EQ("Learn more about the latest " +
|
||||
base::UTF16ToUTF8(system_app_name_) + " update",
|
||||
GetNotificationMessage());
|
||||
@ -448,8 +448,6 @@ TEST_F(UpdateNotificationControllerTest, RollbackRequiredNotification) {
|
||||
TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRecommended) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState(
|
||||
{.requirement_type = RelaunchNotificationState::kRecommendedNotOverdue});
|
||||
|
||||
@ -458,8 +456,7 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRecommended) {
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetStringUTF8(IDS_RELAUNCH_RECOMMENDED_TITLE);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_RECOMMENDED_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_RECOMMENDED_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -477,8 +474,6 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
SetUpdateNotificationRecommendedOverdue) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState(
|
||||
{.requirement_type = RelaunchNotificationState::kRecommendedAndOverdue});
|
||||
|
||||
@ -487,8 +482,7 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetStringUTF8(IDS_RELAUNCH_RECOMMENDED_OVERDUE_TITLE);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -505,7 +499,6 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredDays) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
constexpr base::TimeDelta remaining_time = base::Days(3);
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState({
|
||||
@ -518,8 +511,7 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredDays) {
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetPluralStringFUTF8(IDS_RELAUNCH_REQUIRED_TITLE_DAYS, 3);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -548,8 +540,7 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
waiter.Wait();
|
||||
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDeviceDomain),
|
||||
ui::GetChromeOSDeviceName());
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDeviceDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
EXPECT_EQ(expected_notification_body, GetNotificationMessage());
|
||||
@ -579,7 +570,6 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredHours) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
constexpr base::TimeDelta remaining_time = base::Hours(3);
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState({
|
||||
@ -592,8 +582,7 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredHours) {
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetPluralStringFUTF8(IDS_RELAUNCH_REQUIRED_TITLE_HOURS, 3);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -612,7 +601,6 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredHours) {
|
||||
TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredMinutes) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
constexpr base::TimeDelta remaining_time = base::Minutes(3);
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState({
|
||||
@ -625,8 +613,7 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredMinutes) {
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetPluralStringFUTF8(IDS_RELAUNCH_REQUIRED_TITLE_MINUTES, 3);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -645,7 +632,6 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredMinutes) {
|
||||
TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredSeconds) {
|
||||
ShowDefaultUpdateNotification();
|
||||
|
||||
const std::u16string chrome_os_device_name = ui::GetChromeOSDeviceName();
|
||||
constexpr base::TimeDelta remaining_time = base::Seconds(3);
|
||||
|
||||
Shell::Get()->system_tray_model()->SetRelaunchNotificationState({
|
||||
@ -658,8 +644,7 @@ TEST_F(UpdateNotificationControllerTest, SetUpdateNotificationRequiredSeconds) {
|
||||
const std::string expected_notification_title =
|
||||
l10n_util::GetPluralStringFUTF8(IDS_RELAUNCH_REQUIRED_TITLE_SECONDS, 3);
|
||||
const std::string expected_notification_body = l10n_util::GetStringFUTF8(
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain),
|
||||
chrome_os_device_name);
|
||||
IDS_RELAUNCH_REQUIRED_BODY, base::ASCIIToUTF16(kDomain));
|
||||
|
||||
ASSERT_TRUE(HasNotification());
|
||||
CompareNotificationColor(
|
||||
@ -724,7 +709,7 @@ TEST_F(UpdateNotificationControllerTest,
|
||||
/*expected_color_id_for_jelly=*/cros_tokens::kCrosSysPrimary);
|
||||
EXPECT_TRUE(strcmp(kSystemMenuUpdateIcon.name, GetNotificationIcon().name) ==
|
||||
0);
|
||||
EXPECT_EQ("Update available", GetNotificationTitle());
|
||||
EXPECT_EQ("Update device", GetNotificationTitle());
|
||||
EXPECT_EQ(
|
||||
"Get the latest features and security improvements. Updates happen in "
|
||||
"the background.",
|
||||
|
Reference in New Issue
Block a user