Commit c80574b5 authored by Jana Grill's avatar Jana Grill Committed by Commit Bot

Replace "device" with actual device name

Replace the word "device" with the actual device name in ADB sideloading
notifications texts by adding a placeholder to the affected strings and
replacing it with the corresponding device type when displaying the
notifications.

Bug: 1115444
Change-Id: I6aadf09594bbf19a31dc62a2aab81d855f81fcab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367041Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Jana Grill <janagrill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#800514}
parent c276430b
...@@ -5669,13 +5669,13 @@ You can manage this account’s settings by installing the Family Link app on yo ...@@ -5669,13 +5669,13 @@ You can manage this account’s settings by installing the Family Link app on yo
<ph name="DOMAIN">$1<ex>google.com</ex></ph> has disabled ADB debugging. No new applications can be sideloaded. <ph name="DOMAIN">$1<ex>google.com</ex></ph> has disabled ADB debugging. No new applications can be sideloaded.
</message> </message>
<message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_PLANNED_NOTIFICATION_TITLE" desc="Title for the notification informing the user that local data will be deleted."> <message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_PLANNED_NOTIFICATION_TITLE" desc="Title for the notification informing the user that local data will be deleted.">
Device data will be deleted in 24 hours <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> data will be deleted in 24 hours
</message> </message>
<message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_ON_REBOOT_NOTIFICATION_TITLE" desc="Title for the notification informing the user that local data will be deleted after reboot."> <message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_ON_REBOOT_NOTIFICATION_TITLE" desc="Title for the notification informing the user that local data will be deleted after reboot.">
Device data will be deleted <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> data will be deleted
</message> </message>
<message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE" desc="Text for the notification informing the user that that ADB sideloading has been disabled by the administrator which will result in local data being deleted after reboot."> <message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE" desc="Text for the notification informing the user that that ADB sideloading has been disabled by the administrator which will result in local data being deleted after reboot.">
<ph name="DOMAIN">$1<ex>google.com</ex></ph> is disabling ADB debugging, which will reset your device. Back up your files before restarting. <ph name="DOMAIN">$1<ex>google.com</ex></ph> is disabling ADB debugging, which will reset your <ph name="DEVICE_TYPE">$2<ex>Chromebook</ex></ph>. Back up your files before restarting.
</message> </message>
<message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_RESTART_TO_POWERWASH" meaning="button label" desc="Button label to restart the device which will result in local data being deleted."> <message name="IDS_ADB_SIDELOADING_POLICY_CHANGE_RESTART_TO_POWERWASH" meaning="button label" desc="Button label to restart the device which will result in local data being deleted.">
Restart to powerwash Restart to powerwash
......
dd2aebf98fb54b31792a3532387f47b183ab20b0 1a6166e9d0cb112212e4ab4d04f1fba5069d4813
\ No newline at end of file \ No newline at end of file
8cb1d465e8902fe4ed24c232f598e9ad0617375c 1a6166e9d0cb112212e4ab4d04f1fba5069d4813
\ No newline at end of file \ No newline at end of file
dd2aebf98fb54b31792a3532387f47b183ab20b0 e7aea93f853e4df4b34d670c5c0968cedd37e02c
\ No newline at end of file \ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "components/prefs/pref_service.h" #include "components/prefs/pref_service.h"
#include "components/vector_icons/vector_icons.h" #include "components/vector_icons/vector_icons.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/chromeos/devicetype_utils.h"
namespace { namespace {
constexpr char kAdbSideloadingDisallowedNotificationId[] = constexpr char kAdbSideloadingDisallowedNotificationId[] =
...@@ -45,6 +46,7 @@ void AdbSideloadingPolicyChangeNotification::Show(Type type) { ...@@ -45,6 +46,7 @@ void AdbSideloadingPolicyChangeNotification::Show(Type type) {
base::UTF8ToUTF16(g_browser_process->platform_part() base::UTF8ToUTF16(g_browser_process->platform_part()
->browser_policy_connector_chromeos() ->browser_policy_connector_chromeos()
->GetEnterpriseDisplayDomain()); ->GetEnterpriseDisplayDomain());
base::string16 device_type = ui::GetChromeOSDeviceName();
switch (type) { switch (type) {
case Type::kNone: case Type::kNone:
...@@ -59,19 +61,21 @@ void AdbSideloadingPolicyChangeNotification::Show(Type type) { ...@@ -59,19 +61,21 @@ void AdbSideloadingPolicyChangeNotification::Show(Type type) {
notification_id = kAdbSideloadingDisallowedNotificationId; notification_id = kAdbSideloadingDisallowedNotificationId;
break; break;
case Type::kPowerwashPlanned: case Type::kPowerwashPlanned:
title = l10n_util::GetStringUTF16( title = l10n_util::GetStringFUTF16(
IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_PLANNED_NOTIFICATION_TITLE); IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_PLANNED_NOTIFICATION_TITLE,
device_type);
text = l10n_util::GetStringFUTF16( text = l10n_util::GetStringFUTF16(
IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE, IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE,
enterprise_display_domain); enterprise_display_domain, device_type);
notification_id = kAdbSideloadingPowerwashPlannedNotificationId; notification_id = kAdbSideloadingPowerwashPlannedNotificationId;
break; break;
case Type::kPowerwashOnNextReboot: case Type::kPowerwashOnNextReboot:
title = l10n_util::GetStringUTF16( title = l10n_util::GetStringFUTF16(
IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_ON_REBOOT_NOTIFICATION_TITLE); IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_ON_REBOOT_NOTIFICATION_TITLE,
device_type);
text = l10n_util::GetStringFUTF16( text = l10n_util::GetStringFUTF16(
IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE, IDS_ADB_SIDELOADING_POLICY_CHANGE_POWERWASH_NOTIFICATION_MESSAGE,
enterprise_display_domain); enterprise_display_domain, device_type);
notification_id = kAdbSideloadingPowerwashOnRebootNotificationId; notification_id = kAdbSideloadingPowerwashOnRebootNotificationId;
pinned = true; pinned = true;
notification_actions.push_back( notification_actions.push_back(
......
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