From 28c380aec4fe86ee97353b39462318dd5a9ab146 Mon Sep 17 00:00:00 2001 From: Pete Miller Date: Mon, 27 Jan 2020 22:06:54 -0800 Subject: [PATCH] New Tab Page WebUI: Prompt to turn on Brave Ads instead of Brave Rewards when Brave Ads is off --- .storybook/locale.ts | 1 + .../components/default/rewards/brandedWallpaperNotification.tsx | 1 + .../brave_new_tab_ui/components/default/rewards/index.tsx | 1 + components/resources/brave_components_strings.grd | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.storybook/locale.ts b/.storybook/locale.ts index 5359e5993508..dff975122cad 100644 --- a/.storybook/locale.ts +++ b/.storybook/locale.ts @@ -221,6 +221,7 @@ const locale: Record = { rewardsWidgetAdsOptInDescription: 'Earn tokens by viewing privacy-respecting ads.', rewardsWidgetMonthlyTips: 'Tips and contributions this month', rewardsWidgetNotificationTitle: 'Way to Go!', + rewardsWidgetEnableBrandedWallpaperSubTitle: 'Turn on $3 to claim your share. You can also choose to $1hide sponsored images$2.', rewardsWidgetBrandedNotificationTitle: 'You\'re getting paid to view this background image.', rewardsWidgetBrandedNotificationDescription: '$1Learn more$2 about sponsored images in Brave Rewards.', rewardsWidgetAboutRewards: '$1Learn more$2 about Brave Rewards', diff --git a/components/brave_new_tab_ui/components/default/rewards/brandedWallpaperNotification.tsx b/components/brave_new_tab_ui/components/default/rewards/brandedWallpaperNotification.tsx index ac712cfe66d6..d623d6e42fb7 100644 --- a/components/brave_new_tab_ui/components/default/rewards/brandedWallpaperNotification.tsx +++ b/components/brave_new_tab_ui/components/default/rewards/brandedWallpaperNotification.tsx @@ -52,6 +52,7 @@ export default class BrandedWallpaperRewardsNotification extends React.PureCompo renderPreAdsOptInContent () { const text = getLocale('rewardsWidgetEnableBrandedWallpaperSubTitle') + .replace('$3', 'Brave Ads') const { beforeTag, duringTag, afterTag } = splitStringForTag(text, '$1', '$2') return ( <> diff --git a/components/brave_new_tab_ui/components/default/rewards/index.tsx b/components/brave_new_tab_ui/components/default/rewards/index.tsx index c2a35166ea0c..d7b1af89cb66 100644 --- a/components/brave_new_tab_ui/components/default/rewards/index.tsx +++ b/components/brave_new_tab_ui/components/default/rewards/index.tsx @@ -116,6 +116,7 @@ class Rewards extends React.PureComponent { if (isShowingBrandedWallpaper) { titleText = getLocale('rewardsWidgetEnableBrandedWallpaperTitle') const text = getLocale('rewardsWidgetEnableBrandedWallpaperSubTitle') + .replace('$3', 'Brave Rewards') const { beforeTag, duringTag, afterTag } = splitStringForTag(text, '$1', '$2') subTitleText = ( <> diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd index 10c3b3e819bf..0a4e7723068c 100644 --- a/components/resources/brave_components_strings.grd +++ b/components/resources/brave_components_strings.grd @@ -671,7 +671,7 @@ - Turn on Brave Rewards to claim your share. You can also choose to $1hide sponsored images$2. + Turn on $3Brave Rewards to claim your share. You can also choose to $1hide sponsored images$2. Way to Go! Your rewards from Ads are here