Commit 5f125e72 authored by Jana Grill's avatar Jana Grill Committed by Chromium LUCI CQ

Adjust relaunch notifications for FlexOrgs

Add the device type placeholders to IDS_RELAUNCH_REQUIRED_BODY,
IDS_RELAUNCH_RECOMMENDED_BODY and IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY,
replacing them with the actual device type in code. Additionally adjust
the domain placeholder names and descriptions and add screenshots to
make it easier for the translators to understand the usage of the texts.

The domain placeholder is already populated using
BrowserPolicyConnectorChromeOS::GetEnterpriseDomainManager, so no change
was needed there.

Bug: b:172682102, b:172682697, b:172682411
Test: Manual
Change-Id: I1eeaaa279d2f59b6b4a9c51367bdeaf29821f72e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2570574Reviewed-by: default avatarBrian Malcolm <bmalcolm@chromium.org>
Reviewed-by: default avatarBret Sepulveda <bsep@chromium.org>
Commit-Queue: Jana Grill <janagrill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834254}
parent c370542e
......@@ -374,8 +374,8 @@
=1 {Update device within 1 second}
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.">
<ph name="organization_name">$1<ex>google.com</ex></ph> requires you to update this device before the deadline.
<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 this <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> before the deadline.
</message>
<message name="IDS_RELAUNCH_RECOMMENDED_TITLE" desc="The title of a dialog that tells users that a device restart is recommended for an update.">
......@@ -384,11 +384,11 @@
<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
</message>
<message name="IDS_RELAUNCH_RECOMMENDED_BODY" desc="The body text of a dialog that tells users the device must be restarted.">
<ph name="organization_name">$1<ex>google.com</ex></ph> recommends that you update this device.
<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 this <ph name="DEVICE_TYPE">$2<ex>Chromebook</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.">
<ph name="organization_name">$1<ex>google.com</ex></ph> requires you to update this device immediately.
<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 this <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph> immediately.
</message>
<!-- Chrome OS Strings -->
......
19b1999ddf8d24c17222245c87079f65aedd57b1
\ No newline at end of file
8bbf09ff39bdb507669579d145c0cad6d8dcb1d0
\ No newline at end of file
8bbf09ff39bdb507669579d145c0cad6d8dcb1d0
\ No newline at end of file
19b1999ddf8d24c17222245c87079f65aedd57b1
\ No newline at end of file
2c4bf103c2bf5cf38c106731cbebf75dca983eb6
\ No newline at end of file
......@@ -17,6 +17,7 @@
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/chromeos/devicetype_utils.h"
RelaunchNotificationControllerPlatformImpl::
RelaunchNotificationControllerPlatformImpl() = default;
......@@ -86,16 +87,16 @@ void RelaunchNotificationControllerPlatformImpl::
SystemTrayClient::Get()->SetUpdateNotificationState(
ash::NotificationStyle::kAdminRecommended,
l10n_util::GetStringUTF16(IDS_RELAUNCH_RECOMMENDED_OVERDUE_TITLE),
l10n_util::GetStringFUTF16(
IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY,
base::UTF8ToUTF16(enterprise_display_domain)));
l10n_util::GetStringFUTF16(IDS_RELAUNCH_RECOMMENDED_OVERDUE_BODY,
base::UTF8ToUTF16(enterprise_display_domain),
ui::GetChromeOSDeviceName()));
} else {
SystemTrayClient::Get()->SetUpdateNotificationState(
ash::NotificationStyle::kAdminRecommended,
l10n_util::GetStringUTF16(IDS_RELAUNCH_RECOMMENDED_TITLE),
l10n_util::GetStringFUTF16(
IDS_RELAUNCH_RECOMMENDED_BODY,
base::UTF8ToUTF16(enterprise_display_domain)));
l10n_util::GetStringFUTF16(IDS_RELAUNCH_RECOMMENDED_BODY,
base::UTF8ToUTF16(enterprise_display_domain),
ui::GetChromeOSDeviceName()));
}
}
......@@ -115,7 +116,8 @@ void RelaunchNotificationControllerPlatformImpl::
relaunch_required_timer_->GetWindowTitle(),
l10n_util::GetStringFUTF16(
IDS_RELAUNCH_REQUIRED_BODY,
base::UTF8ToUTF16(connector->GetEnterpriseDomainManager())));
base::UTF8ToUTF16(connector->GetEnterpriseDomainManager()),
ui::GetChromeOSDeviceName()));
}
}
......
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