Skip to content

Commit

Permalink
Updates copy for monthly flows
Browse files Browse the repository at this point in the history
  • Loading branch information
NejcZdovc committed Nov 27, 2019
1 parent 7fe7fe2 commit 01ce0e2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
3 changes: 1 addition & 2 deletions browser/ui/webui/brave_webui_source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,7 @@ void CustomizeWebUIHTMLSource(const std::string &name,
{ "points", IDS_BRAVE_UI_POINTS },
{ "rewardsBannerText1", IDS_BRAVE_UI_REWARDS_BANNER_TEXT1 },
{ "rewardsBannerText2", IDS_BRAVE_UI_REWARDS_BANNER_TEXT2 },
{ "rewardsBannerMonthlyText1", IDS_BRAVE_UI_REWARDS_BANNER_TEXT1 },
{ "rewardsBannerMonthlyText2", IDS_BRAVE_UI_REWARDS_BANNER_TEXT2 },
{ "rewardsBannerMonthlyText1", IDS_BRAVE_UI_REWARDS_BANNER_MONTHLY_TEXT1 },
{ "sendDonation", IDS_BRAVE_UI_SEND_DONATION },
{ "setContribution", IDS_BRAVE_UI_SET_CONTRIBUTION },
{ "shareText", IDS_BRAVE_UI_SHARE_TEXT },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,34 @@ export default class SiteBanner extends React.PureComponent<Props, {}> {
}

getText (children?: React.ReactNode) {
if (!children) {
const bannerText = this.props.type === 'one-time'
? 'rewardsBanner'
: 'rewardsBannerMonthly'
if (children) {
return children
}

if (this.props.type === 'one-time') {
return (
<>
<p>
{getLocale(`${bannerText}Text1`)}
{getLocale(`rewardsBannerText1`)}
</p>
<p>
{getLocale(`rewardsBannerText2`)}
</p>
</>
)
}

if (this.props.type === 'monthly') {
return (
<>
<p>
{getLocale(`${bannerText}Text2`)}
{getLocale(`rewardsBannerMonthlyText1`)}
</p>
</>
)
}

return children
return null
}

onDonate = (amount: string) => {
Expand Down
5 changes: 3 additions & 2 deletions components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
<message name="IDS_BRAVE_REWARDS_LOCAL_GENERAL_GRANT_ERROR_TEXT" desc="">Brave Rewards is having an issue. Please try again later.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_WALLET_CORRUPTED" desc="">We detected that something is wrong with your wallet. You must recover your backup wallet before any transactions can be processed.</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_WALLET_CORRUPTED_NOW" desc="">Recover now!</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_DONAT_NEXT_DATE" desc="Description of the date in the donation box">Next monthly tip date</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_DONAT_NEXT_DATE" desc="Description of the date in the donation box">Next monthly contribution date</message>
<message name="IDS_BRAVE_REWARDS_LOCAL_COMPLIMENT_TWEET" desc="">
I just tipped <ph name="NAME">$1<ex>user</ex></ph> using the Brave Browser. Check it out at https://brave.com/tips.
</message>
Expand Down Expand Up @@ -493,6 +493,7 @@
<message name="IDS_BRAVE_UI_REWARDS_BACKUP_TEXT3" desc="">You can always use this key to get your wallet back if something happens to your browser or computer. But make sure to protect it — anyone who gets this key could steal your wallet. It’s probably safest to write it down on a piece of paper, or wherever else you keep important info.</message>
<message name="IDS_BRAVE_UI_REWARDS_BANNER_TEXT1" desc="">You can support this content creator by sending a tip. It’s a way of thanking them for making great content. Verified creators get paid for their tips during the first week of each calendar month.</message>
<message name="IDS_BRAVE_UI_REWARDS_BANNER_TEXT2" desc="">You can also set a monthly recurring contribution from within the Brave Rewards panel.</message>
<message name="IDS_BRAVE_UI_REWARDS_BANNER_MONTHLY_TEXT1" desc="">You can support this content creator by setting a monthly contribution. It’s a way of thanking them for making great content on an ongoing basis. Verified creators get paid for their contributions during the first week of each calendar month.</message>
<message name="IDS_BRAVE_UI_REWARDS_CONTRIBUTE" desc="">Auto-Contribute</message>
<message name="IDS_BRAVE_UI_REWARDS_CONTRIBUTE_ATTENTION" desc="">Attention</message>
<message name="IDS_BRAVE_UI_REWARDS_CONTRIBUTE_ATTENTION_SCORE" desc="">Attention</message>
Expand Down Expand Up @@ -587,7 +588,7 @@
<message name="IDS_BRAVE_UI_SITE_UNVERIFIED_TEXT_MORE" desc="">Learn more.</message>
<message name="IDS_BRAVE_UI_ADS_EARNINGS" desc="Description text for ad grants in grant details">earned from ads</message>
<message name="IDS_BRAVE_UI_PENDING_CONTRIBUTIONS" desc="Title of pending contribution modal">Pending contributions</message>
<message name="IDS_BRAVE_UI_PENDING_TYPE_RECURRING" desc="Name of recurring tip type">Recurring tip</message>
<message name="IDS_BRAVE_UI_PENDING_TYPE_RECURRING" desc="Name of recurring tip type">Monthly Contribution</message>
<message name="IDS_BRAVE_UI_PENDING_TYPE_TIP" desc="Name of one-time tip type">One-time tip</message>
<message name="IDS_BRAVE_UI_PENDING_TYPE_AC" desc="Name of auto contribute type">Auto-Contribute</message>
<message name="IDS_BRAVE_UI_RESERVED_ALL_LINK" desc="Link that shows all pending contributions">Show all pending contributions</message>
Expand Down

0 comments on commit 01ce0e2

Please sign in to comment.