Commit 04b5203d authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Add all UI strings for UnifiedSystemTray.

This CL adds all remaining UI strings for UnifiedSystemTray. String
freeze will happen soon, so we have to make sure they land before that.

TEST=manual
BUG=813499

Change-Id: I8fed8fd079643fc37957a82628a24d09343fb70a
Reviewed-on: https://chromium-review.googlesource.com/1103435Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568305}
parent 8d91252f
......@@ -488,8 +488,25 @@ This file contains the strings for ash.
<message name="IDS_ASH_STATUS_TRAY_SHUTDOWN" desc="The accessible text for the shutdown button.">
Shut down
</message>
<message name="IDS_ASH_STATUS_TRAY_COLLAPSE" desc="The accessible text for the collapse button of system menu.">
Collapse
<message name="IDS_ASH_STATUS_TRAY_COLLAPSE" desc="The accessible text for the button to collapse system menu.">
Collapse menu
</message>
<message name="IDS_ASH_STATUS_TRAY_EXPAND" desc="The accessible text for the button to expand system menu.">
Expand menu
</message>
<message name="IDS_ASH_STATUS_TRAY_NOTIFICATIONS_LABEL" desc="The label text shown under do not disturb button in system tray bubble.">
Notifications
</message>
<message name="IDS_ASH_STATUS_TRAY_NOTIFICATIONS_ON_SUBLABEL" desc="The sub label text shown under do not disturb button when all notifications are enabled.">
On, all apps
</message>
<message name="IDS_ASH_STATUS_TRAY_NOTIFICATIONS_OFF_FOR_APPS_SUBLABEL" desc="The sub label text shown under do not disturb button when some notifications are disabled. [ICU Syntax]">
{NUM_APPS, plural,
=1 {Off for an app}
other {Off for # apps}}
</message>
<message name="IDS_ASH_STATUS_TRAY_NOTIFICATIONS_DO_NOT_DISTURB_SUBLABEL" desc="The sub label text shown under do not disturb button when all notifications are disabled.">
Do not disturb
</message>
<!-- Status tray enterprise management. -->
......@@ -716,6 +733,27 @@ This file contains the strings for ash.
<message name="IDS_ASH_NETWORK_AUTOCONNECT_NOTIFICATION_MESSAGE" desc="Message displayed in the system notification shown when a network has been auto-connected (e.g., when an enterprise policy is applied which initiates a connection to a corporate network like Google-A).">
Your connection has switched to a more secure network
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_LABEL" desc="The label text used when network is not connected.">
Not connected
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL" desc="The sub label text used when network is not connected.">
No networks
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_SIGNAL_WEAK_SUBLABEL" desc="The sub label text used when WiFi signal strength is weak (among weak, medium, and strong.)">
Weak
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_SIGNAL_MEDIUM_SUBLABEL" desc="The sub label text used when WiFi signal strength is medium (among weak, medium, and strong.)">
Medium
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_SIGNAL_STRONG_SUBLABEL" desc="The sub label text used when WiFi signal strength is strong (among weak, medium, and strong.)">
Strong
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING_SUBLABEL" desc="The sub label text used when network is connecting. The network name is shown above this label.">
Connecting
</message>
<message name="IDS_ASH_STATUS_TRAY_NETWORK_ACTIVATING_SUBLABEL" desc="The sub label text used when network is activating. The network name is shown above this label.">
Activating
</message>
<!-- Status Tray Network strings -->
<message name="IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PINCODE" desc="Bluetooth pairing message typically shown on a request from a 2.0 device that has a keyboard.">
......
......@@ -108,13 +108,17 @@ CollapseButton::CollapseButton(views::ButtonListener* listener)
SetImage(views::Button::STATE_NORMAL,
gfx::CreateVectorIcon(kNotificationCenterCollapseIcon,
kCollapseIconSize, kUnifiedMenuIconColor));
SetTooltipText(l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_COLLAPSE));
}
CollapseButton::~CollapseButton() = default;
void CollapseButton::SetExpandedAmount(double expanded_amount) {
expanded_amount_ = expanded_amount;
if (expanded_amount == 0.0 || expanded_amount == 1.0) {
SetTooltipText(l10n_util::GetStringUTF16(expanded_amount == 1.0
? IDS_ASH_STATUS_TRAY_COLLAPSE
: IDS_ASH_STATUS_TRAY_EXPAND));
}
SchedulePaint();
}
......
......@@ -28,8 +28,8 @@ QuietModeFeaturePodController::~QuietModeFeaturePodController() {
FeaturePodButton* QuietModeFeaturePodController::CreateButton() {
DCHECK(!button_);
button_ = new FeaturePodButton(this);
button_->SetLabel(l10n_util::GetStringUTF16(
IDS_ASH_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP));
button_->SetLabel(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_NOTIFICATIONS_LABEL));
OnQuietModeChanged(MessageCenter::Get()->IsQuietMode());
return button_;
}
......@@ -54,8 +54,8 @@ void QuietModeFeaturePodController::OnQuietModeChanged(bool in_quiet_mode) {
: kNotificationCenterDoNotDisturbOffIcon);
button_->SetToggled(in_quiet_mode);
button_->SetSubLabel(l10n_util::GetStringUTF16(
in_quiet_mode ? IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_ON_STATE
: IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_OFF_STATE));
in_quiet_mode ? IDS_ASH_STATUS_TRAY_NOTIFICATIONS_DO_NOT_DISTURB_SUBLABEL
: IDS_ASH_STATUS_TRAY_NOTIFICATIONS_ON_SUBLABEL));
}
} // namespace ash
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