0

Saved desks: Upload context menu tooltip

Upload the context menu button tooltip string for translation.

Bug: b/327639285
Change-Id: I5a288f27067b9df4694abcae93b741bccc42a47b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5760691
Reviewed-by: Sammie Quon <sammiequon@chromium.org>
Commit-Queue: Elijah Hewer <hewer@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1336871}
This commit is contained in:
Elijah Hewer
2024-08-03 00:22:59 +00:00
committed by Chromium LUCI CQ
parent 252dd04a2f
commit 209ffd82e7
4 changed files with 4 additions and 2 deletions

@ -2765,7 +2765,7 @@ You can also use the keyboard shortcut. First, highlight text, then press <ph na
<message name="IDS_ASH_DESKS_DESK_NAME_COMMIT" desc="Alert when the desk name is committed">
Desk name was changed to <ph name="DESK_NAME">$1</ph>
</message>
<message name="IDS_ASH_DESKS_CONTEXT_MENU_DESCRIPTION" translateable="false" desc="The tooltip that describes the action of opening the context menu for a desk.">
<message name="IDS_ASH_DESKS_CONTEXT_MENU_DESCRIPTION" desc="The tooltip that describes the action of opening the context menu for a desk.">
Open context menu
</message>
<message name="IDS_ASH_DESKS_COMBINE_DESKS_DESCRIPTION" desc="The tooltip and context menu text that describes the action of closing a desk and moving its windows to another desk.">

@ -0,0 +1 @@
081ac48b38a45a54c591903401c5937fcebb1317

@ -95,7 +95,6 @@ void DeskActionButton::UpdateTooltip(const std::u16string& tooltip) {
int message_id;
switch (type_) {
case DeskActionButton::Type::kContextMenu:
// TODO(hewer): Upload string for translation.
message_id = IDS_ASH_DESKS_CONTEXT_MENU_DESCRIPTION;
break;
case DeskActionButton::Type::kCloseDesk:

@ -42,6 +42,8 @@ DeskActionView::DeskActionView(const std::u16string& combine_desks_target_name,
// if the feature is enabled.
if (features::IsSavedDeskUiRevampEnabled()) {
context_menu_button_ = AddChildView(std::make_unique<DeskActionButton>(
// The tooltip for the context menu button will be set by the button
// itself, as its tooltip is constant.
std::u16string(), DeskActionButton::Type::kContextMenu,
std::move(context_menu_callback), this));
context_menu_button_->AddObserver(this);