diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index 1bffa574ee1e..8e8ba0aa9d60 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -343,6 +343,19 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U Manage Extensions + + + <a target="_blank" href="https://chrome.google.com/webstore/category/extensions">Looking for even more extensions?</a></a> + + + Web Extensions Store + + + View in Web Extensions Store + + + You don't have any extensions yet. Would you like to <a target="_blank" href="https://chrome.google.com/webstore/category/extensions">install some</a></a>? + diff --git a/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc new file mode 100644 index 000000000000..70aa1170f7f0 --- /dev/null +++ b/chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc @@ -0,0 +1,43 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "brave/grit/brave_generated_resources.h" +#include "chrome/grit/generated_resources.h" +#include "content/public/browser/web_ui_data_source.h" + +// These are defined in generated_resources.h, but since we are including it +// here the original extensions_ui.cc shouldn't include it again and the +// redefined values will be used. +#undef IDS_MD_EXTENSIONS_ITEM_CHROME_WEB_STORE +#define IDS_MD_EXTENSIONS_ITEM_CHROME_WEB_STORE \ + IDS_MD_EXTENSIONS_BRAVE_ITEM_CHROME_WEB_STORE +#undef IDS_MD_EXTENSIONS_ITEM_SOURCE_WEBSTORE +#define IDS_MD_EXTENSIONS_ITEM_SOURCE_WEBSTORE \ + IDS_MD_EXTENSIONS_BRAVE_ITEM_SOURCE_WEBSTORE +#undef IDS_MD_EXTENSIONS_NO_INSTALLED_ITEMS +#define IDS_MD_EXTENSIONS_NO_INSTALLED_ITEMS \ + IDS_MD_EXTENSIONS_BRAVE_NO_INSTALLED_ITEMS + +// Forward declarations needed due to extensions_ui.cc being patched with this +// function name. +namespace extensions { +namespace { +void BraveAddLocalizedStrings(content::WebUIDataSource* html_source); +} // namespace +} // namespace extensions + +#include "../../../../../../chrome/browser/ui/webui/extensions/extensions_ui.cc" + +namespace extensions { + +namespace { + +void BraveAddLocalizedStrings(content::WebUIDataSource* html_source) { + html_source->AddLocalizedString("moreExtensions", + IDS_MD_EXTENSIONS_BRAVE_MORE_EXTENSIONS); +} + +} // namespace + +} // namespace extensions diff --git a/patches/chrome-browser-resources-md_extensions-item_list.html.patch b/patches/chrome-browser-resources-md_extensions-item_list.html.patch new file mode 100644 index 000000000000..7d294e29f14a --- /dev/null +++ b/patches/chrome-browser-resources-md_extensions-item_list.html.patch @@ -0,0 +1,18 @@ +diff --git a/chrome/browser/resources/md_extensions/item_list.html b/chrome/browser/resources/md_extensions/item_list.html +index 90244de120cf8fda71002f535810619b1e8aeb3e..84450aca34abf7b55e1289b8716b81d5323e6ec0 100644 +--- a/chrome/browser/resources/md_extensions/item_list.html ++++ b/chrome/browser/resources/md_extensions/item_list.html +@@ -106,6 +106,13 @@ + + + ++
++ ++ $i18nRaw{moreExtensions} ++ ++
+ + + diff --git a/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch new file mode 100644 index 000000000000..4caa87621ecd --- /dev/null +++ b/patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch @@ -0,0 +1,13 @@ +diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc +index 1b7560672a3608c7331799ce516d63066bf4d068..c3480b2cdcdf6950a6a8c136f3a8dabde5e4a615 100644 +--- a/chrome/browser/ui/webui/extensions/extensions_ui.cc ++++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc +@@ -285,6 +285,8 @@ content::WebUIDataSource* CreateMdExtensionsSource(bool in_dev_mode) { + AddLocalizedStringsBulk(source, localized_strings, + base::size(localized_strings)); + ++ BraveAddLocalizedStrings(source); ++ + source->AddString("errorLinesNotShownSingular", + l10n_util::GetPluralStringFUTF16( + IDS_MD_EXTENSIONS_ERROR_LINES_NOT_SHOWN, 1));