Commit 0b42ef58 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Tab Search: Add localization strings

Bug: 1099917
Change-Id: I3cccad2231c414a1031475604bd12be70a9bc270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2420772
Commit-Queue: Yuheng Huang <yuhengh@chromium.org>
Reviewed-by: default avatarThomas Lukaszewicz <tluk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809115}
parent d41ebd07
...@@ -6739,6 +6739,37 @@ the Bookmarks menu."> ...@@ -6739,6 +6739,37 @@ the Bookmarks menu.">
</if> </if>
</if> </if>
<!-- Tab Search -->
<if expr="enable_tab_search">
<message name="IDS_TAB_SEARCH_SEARCH_TABS" desc="The label on the tab search search filed when user input is empty.">
Search Tabs
</message>
<message name="IDS_TAB_SEARCH_NO_RESULTS_FOUND" desc="Indicator when no tabs are found filtered by user search input.">
No Results Found
</message>
<message name="IDS_TAB_SEARCH_CLOSE_TAB" desc="Label of the close tab button in the tab list item.">
Close Tab
</message>
<message name="IDS_TAB_SEARCH_SUBMIT_FEEDBACK" desc="Label of the submit feedback button.">
Submit Feedback
</message>
<message name="IDS_TAB_SEARCH_A11Y_TAB_CLOSED" desc="A11y message after user clicks on the close tab button in the list item.">
Tab Closed
</message>
<message name="IDS_TAB_SEARCH_A11Y_FOUND_TAB" desc="Singular form of a11y message after user changes search field when search filed is empty.">
Found <ph name="NUM">$1<ex>1</ex></ph> Tab
</message>
<message name="IDS_TAB_SEARCH_A11Y_FOUND_TABS" desc="Plural form of a11y message after user changes search field when search filed is empty.">
Found <ph name="NUM">$1<ex>2</ex></ph> Tabs
</message>
<message name="IDS_TAB_SEARCH_A11Y_FOUND_TAB_FOR" desc="Singular form of a11y message after user changes search field when search filed is not empty.">
Found <ph name="NUM">$1<ex>1</ex></ph> Tab For '<ph name="SEARCH_TEXT">$2<ex>google</ex></ph>'
</message>
<message name="IDS_TAB_SEARCH_A11Y_FOUND_TABS_FOR" desc="Plural form of a11y message after user changes search field when search filed is not empty.">
Found <ph name="NUM">$1<ex>2</ex></ph> Tabs For '<ph name="SEARCH_TEXT">$2<ex>google</ex></ph>'
</message>
</if>
<!-- Strings for Window Titles in Menus --> <!-- Strings for Window Titles in Menus -->
<if expr="not use_titlecase"> <if expr="not use_titlecase">
<message name="IDS_BROWSER_WINDOW_TITLE_MENU_ENTRY" desc="The format for details of the title displayed in tabs and popup windows. [ICU Syntax]"> <message name="IDS_BROWSER_WINDOW_TITLE_MENU_ENTRY" desc="The format for details of the title displayed in tabs and popup windows. [ICU Syntax]">
......
a2fdda6c1c45f4df1c8ff45b11fb451af95f2534
\ No newline at end of file
aacc632774e4805b881014a069808248de0bfe32
\ No newline at end of file
b43d659922031e2d31b0e7db9cc96427517a0de6
\ No newline at end of file
77bf9ff6e784946f5dd8d5a274cd3f08847228e2
\ No newline at end of file
1ce635829ccc62007434f66feca5f7b56ac2ac20
\ No newline at end of file
7df2a4a83aad5a2822c28a1425653ec1a4140d97
\ No newline at end of file
5ae3d59550438906fc1674b13c764c413ec7bcd6
\ No newline at end of file
94353af9ae5c55569cff3634fbba291af754c927
\ No newline at end of file
94353af9ae5c55569cff3634fbba291af754c927
\ No newline at end of file
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_data_source.h"
#include "ui/base/webui/web_ui_util.h"
#if BUILDFLAG(ENABLE_TAB_SEARCH) #if BUILDFLAG(ENABLE_TAB_SEARCH)
#include "chrome/grit/tab_search_resources.h" #include "chrome/grit/tab_search_resources.h"
...@@ -38,6 +39,20 @@ TabSearchUI::TabSearchUI(content::WebUI* web_ui) ...@@ -38,6 +39,20 @@ TabSearchUI::TabSearchUI(content::WebUI* web_ui)
#if BUILDFLAG(ENABLE_TAB_SEARCH) #if BUILDFLAG(ENABLE_TAB_SEARCH)
content::WebUIDataSource* source = content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUITabSearchHost); content::WebUIDataSource::Create(chrome::kChromeUITabSearchHost);
static constexpr webui::LocalizedString kStrings[] = {
{"clearSearch", IDS_CLEAR_SEARCH},
{"searchTabs", IDS_TAB_SEARCH_SEARCH_TABS},
{"noResultsFound", IDS_TAB_SEARCH_NO_RESULTS_FOUND},
{"closeTab", IDS_TAB_SEARCH_CLOSE_TAB},
{"submitFeedback", IDS_TAB_SEARCH_SUBMIT_FEEDBACK},
{"a11yTabClosed", IDS_TAB_SEARCH_A11Y_TAB_CLOSED},
{"a11yFoundTab", IDS_TAB_SEARCH_A11Y_FOUND_TAB},
{"a11yFoundTabs", IDS_TAB_SEARCH_A11Y_FOUND_TABS},
{"a11yFoundTabFor", IDS_TAB_SEARCH_A11Y_FOUND_TAB_FOR},
{"a11yFoundTabsFor", IDS_TAB_SEARCH_A11Y_FOUND_TABS_FOR},
};
AddLocalizedStringsBulk(source, kStrings);
source->AddLocalizedString("close", IDS_CLOSE); source->AddLocalizedString("close", IDS_CLOSE);
source->AddResourcePath("tab_search.mojom-lite.js", source->AddResourcePath("tab_search.mojom-lite.js",
IDR_TAB_SEARCH_MOJO_LITE_JS); IDR_TAB_SEARCH_MOJO_LITE_JS);
......
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