[ads] Remove //brave/app dependency from //brave/components/brave_ads/browser (#34620)

Moves ads strings from brave/app/brave_generated_resources.grd to a new
components/resources/ads_strings.grdp, replacing the
//brave/app:brave_generated_resources_grit dep in
//brave/components/brave_ads/browser with
//brave/components/resources:strings_grit.
This commit is contained in:
Terry Mancey
2026-03-10 19:21:03 -05:00
committed by GitHub
parent 1f206f7be1
commit b0a8abf043
6 changed files with 20 additions and 15 deletions
-12
View File
@@ -705,18 +705,6 @@ Or change later at <ph name="SETTINGS_EXTENIONS_LINK">$2<ex>brave://settings/ext
<message name="IDS_BRAVE_ADS_NOTIFICATION_AD_ACCESSIBLE_NAME" desc="Text to be spoken when a notification ad is shown">
Brave Notification Ad
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_TITLE" desc="The notification title to show when an external wallet is connected">
&#x1F389; You're now earning!
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_BODY" desc="The notification body to show when an external wallet is connected">
You earn whenever a notification like this appears on your screen. You don't need to click to earn.
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_CLICKED_SAME_AD_MULTIPLE_TIMES_TITLE" desc="The notification title to show when a user clicks an ad multiple times">
You earn when a Brave Ads notification appears
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_CLICKED_SAME_AD_MULTIPLE_TIMES_BODY" desc="The notification body to show when a user clicks an ad multiple times">
You don't need to click to earn, but do click if you're interested!
</message>
<message name="IDS_BRAVE_ADS_SEARCH_RESULT_AD_CLICKED_INFOBAR_MESSAGE" desc="The text label of creative search result ad infobar message">
Thanks for supporting Brave Search by clicking a private ad. Unlike Big Tech, we measure ad performance anonymously to preserve your privacy.
</message>
+1 -1
View File
@@ -70,9 +70,9 @@ static_library("browser") {
]
deps += [
"//brave/app:brave_generated_resources_grit",
"//brave/common",
"//brave/components/brave_rewards/core",
"//brave/components/resources:strings_grit",
"//components/history/core/browser",
"//components/variations",
"//content/public/browser",
+1 -1
View File
@@ -1,3 +1,3 @@
include_rules = [
"+brave/grit/brave_generated_resources.h",
"+components/grit/brave_components_strings.h",
]
@@ -10,7 +10,7 @@
#include "base/notreached.h"
#include "brave/components/brave_ads/core/mojom/brave_ads.mojom.h"
#include "brave/components/brave_ads/core/public/ad_units/notification_ad/notification_ad_constants.h"
#include "brave/grit/brave_generated_resources.h"
#include "components/grit/brave_components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<grit-part>
<!-- Brave Ads -->
<message name="IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_TITLE" desc="The notification title to show when an external wallet is connected">
&#x1F389; You're now earning!
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_EXTERNAL_WALLET_CONNECTED_BODY" desc="The notification body to show when an external wallet is connected">
You earn whenever a notification like this appears on your screen. You don't need to click to earn.
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_CLICKED_SAME_AD_MULTIPLE_TIMES_TITLE" desc="The notification title to show when a user clicks an ad multiple times">
You earn when a Brave Ads notification appears
</message>
<message name="IDS_BRAVE_ADS_NOTIFICATION_CLICKED_SAME_AD_MULTIPLE_TIMES_BODY" desc="The notification body to show when a user clicks an ad multiple times">
You don't need to click to earn, but do click if you're interested!
</message>
</grit-part>
@@ -914,6 +914,7 @@
<part file="request_otr_strings.grdp" />
<part file="permissions_strings.grdp" />
<part file="google_sign_in_permission_strings.grdp" />
<part file="ads_strings.grdp" />
<part file="rewards_strings.grdp" />
<part file="wallet_strings.grdp" />
<part file="tor_strings.grdp" />