Commit 61016d59 authored by Caroline Rising's avatar Caroline Rising Committed by Commit Bot

Add label to read later menu button and update menu title.

Bug: 1109316
Change-Id: I7b43d2fcfcce720ac8a812034aade2cecbc2c715
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2428392Reviewed-by: default avatarConnie Wan <connily@chromium.org>
Commit-Queue: Caroline Rising <corising@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810261}
parent bcabe94c
...@@ -5683,10 +5683,17 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -5683,10 +5683,17 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message> </message>
</if> </if>
<!-- Read Later menu --> <!-- Read Later button and menu -->
<message name="IDS_READ_LATER_MENU_TITLE" desc="Title of the Read later menu"> <if expr="use_titlecase">
Read later <message name="IDS_READ_LATER_TITLE" desc="Title of the Read later menu">
</message> Reading List
</message>
</if>
<if expr="not use_titlecase">
<message name="IDS_READ_LATER_TITLE" desc="Title of the Read later menu">
Reading list
</message>
</if>
<message name="IDS_READ_LATER_MENU_UNREAD_HEADER" desc="Header for section of unread Read later items."> <message name="IDS_READ_LATER_MENU_UNREAD_HEADER" desc="Header for section of unread Read later items.">
UNREAD UNREAD
</message> </message>
...@@ -5742,9 +5749,6 @@ Keep your key file in a safe place. You will need it to create new versions of y ...@@ -5742,9 +5749,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_TOOLTIP_MIC_SEARCH" desc="The tooltip for search-by-voice button"> <message name="IDS_TOOLTIP_MIC_SEARCH" desc="The tooltip for search-by-voice button">
Search by voice Search by voice
</message> </message>
<message name="IDS_TOOLTIP_READ_LATER_BUTTON" desc="The tooltip for the read-later button">
Read later
</message>
<message name="IDS_TOOLTIP_SAVE_CREDIT_CARD" desc="The tooltip for the icon that shows the save credit card bubble"> <message name="IDS_TOOLTIP_SAVE_CREDIT_CARD" desc="The tooltip for the icon that shows the save credit card bubble">
Save card Save card
</message> </message>
......
97cc37ef9726d64172b7cfdd8bf251cb5b66d645
\ No newline at end of file
07fc3d80481bd9c45c4ce4dc913d9ca6a11cae78
\ No newline at end of file
5b3b3031843ec01ec012ee1c6ee2c48729910490
\ No newline at end of file
...@@ -19,13 +19,17 @@ ...@@ -19,13 +19,17 @@
#include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/bubble/bubble_dialog_delegate_view.h"
#include "ui/views/controls/button/button.h" #include "ui/views/controls/button/button.h"
#include "ui/views/controls/button/button_controller.h" #include "ui/views/controls/button/button_controller.h"
#include "ui/views/controls/button/label_button.h"
ReadLaterButton::ReadLaterButton(Browser* browser) ReadLaterButton::ReadLaterButton(Browser* browser)
: ToolbarButton(this), browser_(browser) { : ToolbarButton(this), browser_(browser) {
SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_READ_LATER_BUTTON)); SetTooltipText(l10n_util::GetStringUTF16(IDS_READ_LATER_TITLE));
GetViewAccessibility().OverrideHasPopup(ax::mojom::HasPopup::kMenu); GetViewAccessibility().OverrideHasPopup(ax::mojom::HasPopup::kMenu);
button_controller()->set_notify_action( button_controller()->set_notify_action(
views::ButtonController::NotifyAction::kOnPress); views::ButtonController::NotifyAction::kOnPress);
// We don't want to use ToolbarButton::SetHighlight here because it adds a
// border around the button.
LabelButton::SetText(l10n_util::GetStringUTF16(IDS_READ_LATER_TITLE));
} }
ReadLaterButton::~ReadLaterButton() = default; ReadLaterButton::~ReadLaterButton() = default;
......
...@@ -41,7 +41,7 @@ ReadLaterUI::ReadLaterUI(content::WebUI* web_ui) ...@@ -41,7 +41,7 @@ ReadLaterUI::ReadLaterUI(content::WebUI* web_ui)
IDR_READ_LATER_MOJO_LITE_JS); IDR_READ_LATER_MOJO_LITE_JS);
static constexpr webui::LocalizedString kLocalizedStrings[] = { static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"readHeader", IDS_READ_LATER_MENU_READ_HEADER}, {"readHeader", IDS_READ_LATER_MENU_READ_HEADER},
{"title", IDS_READ_LATER_MENU_TITLE}, {"title", IDS_READ_LATER_TITLE},
{"tooltipDelete", IDS_DELETE}, {"tooltipDelete", IDS_DELETE},
{"tooltipMarkAsRead", IDS_READ_LATER_MENU_TOOLTIP_MARK_AS_READ}, {"tooltipMarkAsRead", IDS_READ_LATER_MENU_TOOLTIP_MARK_AS_READ},
{"tooltipMarkAsUnread", IDS_READ_LATER_MENU_TOOLTIP_MARK_AS_UNREAD}, {"tooltipMarkAsUnread", IDS_READ_LATER_MENU_TOOLTIP_MARK_AS_UNREAD},
......
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