0

[Instant Hotspot] Add tether error message strings

Adds strings for QS tether host error messages.

A follow-up CL will wrap the error messages.

Screenshot (before text wrapping): https://screenshot.googleplex.com/AhsnN2Hanut8VAW.jpg

Screenshot (bluetooth turned off, text wrapped): https://screenshot.googleplex.com/AwSvJGAwnngtzGP.jpg

Screenshot (no hotspot found, text wrapped):
https://screenshot.googleplex.com/3W9uKdiYwUizmaL.jpg

Bug: b/305792226, b/305993123
Change-Id: I61f422626d83bcb9a523611114894b37c5ab66e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5033123
Reviewed-by: Chad Duffin <chadduffin@chromium.org>
Commit-Queue: Rudransh Dikshit <rudranshd@google.com>
Reviewed-by: Joe Antonetti <joeantonetti@google.com>
Auto-Submit: Rudransh Dikshit <rudranshd@google.com>
Cr-Commit-Position: refs/heads/main@{#1258636}
This commit is contained in:
rudranshd
2024-02-09 18:39:35 +00:00
committed by Chromium LUCI CQ
parent ad8171aa18
commit 7d346cb21b
5 changed files with 18 additions and 10 deletions

@ -3694,6 +3694,12 @@ Some features are limited to increase battery life.
<message name="IDS_ASH_STATUS_TRAY_NETWORK_MOBILE_DISABLING" desc="The message to display in the network list when mobile data is turning off (disabling).">
Mobile data is turning off...
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_NO_TETHER_DEVICES_FOUND" desc="The message to display in the tether hosts network list when no tether devices are found.">
No available hotspot. Make sure your device is nearby and Bluetooth is turned on.
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_TETHER_NO_BLUETOOTH" desc="The message to display in the tether hosts network list when Bluetooth is disabled.">
Turn on Bluetooth to discover available hotspots nearby
</message>
<message name="IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED" desc="The label used in system tray bubble to display vpn is disconnected.">
VPN disconnected
</message>

@ -0,0 +1 @@
e49b59deb38f7b30e18f2f2dba24f9183a387ae7

@ -0,0 +1 @@
494f49716613706338ff40c0095b532e8697e677

@ -701,14 +701,14 @@ void NetworkListViewControllerImpl::UpdateTetherHostsSection() {
if (!IsBluetoothEnabledOrEnabling(bluetooth_system_state_)) {
CreateInfoLabelIfMissingAndUpdate(
IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED_TOOLTIP,
IDS_ASH_STATUS_TRAY_NETWORK_TETHER_NO_BLUETOOTH,
&tether_hosts_status_message_);
return;
}
if (!has_tether_networks_) {
CreateInfoLabelIfMissingAndUpdate(
IDS_ASH_STATUS_TRAY_NO_MOBILE_DEVICES_FOUND,
IDS_ASH_STATUS_TRAY_NETWORK_NO_TETHER_DEVICES_FOUND,
&tether_hosts_status_message_);
return;
}

@ -1221,9 +1221,9 @@ TEST_P(NetworkListViewControllerTest, HasCorrectTetherStatusMessage) {
} else {
ASSERT_THAT(GetTetherHostsStatusMessage(), NotNull());
ASSERT_THAT(GetTetherHostsSubHeader(), NotNull());
EXPECT_EQ(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NO_MOBILE_DEVICES_FOUND),
GetTetherHostsStatusMessage()->label()->GetText());
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_NO_TETHER_DEVICES_FOUND),
GetTetherHostsStatusMessage()->label()->GetText());
EXPECT_TRUE(network_list(NetworkType::kTether)->GetVisible());
}
@ -1241,9 +1241,9 @@ TEST_P(NetworkListViewControllerTest, HasCorrectTetherStatusMessage) {
} else {
EXPECT_TRUE(network_list(NetworkType::kTether)->GetVisible());
ASSERT_THAT(GetTetherHostsStatusMessage(), NotNull());
EXPECT_EQ(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NO_MOBILE_DEVICES_FOUND),
GetTetherHostsStatusMessage()->label()->GetText());
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_NO_TETHER_DEVICES_FOUND),
GetTetherHostsStatusMessage()->label()->GetText());
}
// Set Bluetooth device to disabling.
@ -1259,7 +1259,7 @@ TEST_P(NetworkListViewControllerTest, HasCorrectTetherStatusMessage) {
ASSERT_THAT(GetTetherHostsStatusMessage(), NotNull());
EXPECT_TRUE(network_list(NetworkType::kTether)->GetVisible());
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED_TOOLTIP),
IDS_ASH_STATUS_TRAY_NETWORK_TETHER_NO_BLUETOOTH),
GetTetherHostsStatusMessage()->label()->GetText());
}
@ -1277,7 +1277,7 @@ TEST_P(NetworkListViewControllerTest, HasCorrectTetherStatusMessage) {
ASSERT_THAT(GetTetherHostsStatusMessage(), NotNull());
EXPECT_TRUE(network_list(NetworkType::kTether)->GetVisible());
EXPECT_EQ(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_DISABLED_TOOLTIP),
IDS_ASH_STATUS_TRAY_NETWORK_TETHER_NO_BLUETOOTH),
GetTetherHostsStatusMessage()->label()->GetText());
}