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 Dec 5, 2019
1 parent 5ca8cfc commit 7390a1b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 27 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 @@ -723,8 +723,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 }, // NOLINT
{ "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 @@ -182,8 +182,8 @@
"description": "Used for grant representation. Whole string is '30.0 BAT expires on 08/05/2022'"
},
"recurringDonations": {
"message": "Monthly Tips",
"description": "Title for monthly tips section in wallet summary"
"message": "Monthly Contributions",
"description": "Title for monthly contributions section in wallet summary"
},
"off": {
"message": "Off",
Expand Down Expand Up @@ -256,7 +256,7 @@
"description": "We show this string in notification when contribution fails"
},
"contributeNotificationNotEnoughFunds": {
"message": "Your scheduled monthly payment for Auto-Contribute and monthly tips could not be completed due to insufficient funds. We’ll try again in 30 days.",
"message": "Your scheduled monthly payment for Auto-Contribute and monthly contributions could not be completed due to insufficient funds. We’ll try again in 30 days.",
"description": "We show this string in the notification when you don't have enough funds for contribution"
},
"contributeNotificationTipError": {
Expand Down Expand Up @@ -400,12 +400,12 @@
"description": "Title message for wallet disabled panel"
},
"tipsProcessedNotification": {
"message": "Your monthly tips have been processed!",
"description": "Message for monthly tips processed notification"
"message": "Your monthly contributions have been processed!",
"description": "Message for monthly contributions processed notification"
},
"contributionTips": {
"message": "Contributions & Tips",
"description": "Title for monthly tips processed notification"
"description": "Title for monthly contributions processed notification"
},
"serviceTextPanelWelcome": {
"message": "By clicking ‘Join Rewards’, you indicate that you have read and agree to the",
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
25 changes: 13 additions & 12 deletions components/resources/brave_components_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,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 @@ -409,8 +409,8 @@
<message name="IDS_BRAVE_UI_DONATE_MONTHLY" desc="">Tip this site Monthly</message>
<message name="IDS_BRAVE_UI_DONATE_NOW" desc="">Send a Tip…</message>
<message name="IDS_BRAVE_UI_DONE" desc="">Done</message>
<message name="IDS_BRAVE_UI_FIRST_TIP_TEXT" desc="">Your first monthly tip will be sent on:</message>
<message name="IDS_BRAVE_UI_DO_MONTHLY" desc="">Set monthly tip</message>
<message name="IDS_BRAVE_UI_FIRST_TIP_TEXT" desc="">Your first monthly contribution will be sent on:</message>
<message name="IDS_BRAVE_UI_DO_MONTHLY" desc="">Set monthly contribution</message>
<message name="IDS_BRAVE_UI_DOWNLOAD_PDF" desc="">Download as PDF</message>
<message name="IDS_BRAVE_UI_EARNINGS_ADS" desc="">Earnings from Ads</message>
<message name="IDS_BRAVE_UI_EARNINGS_CLAIM_DEFAULT" desc="">Your rewards from Ads are here!</message>
Expand Down Expand Up @@ -439,7 +439,7 @@
<message name="IDS_BRAVE_UI_MONTH_NOV" desc="">November</message>
<message name="IDS_BRAVE_UI_MONTH_OCT" desc="">October</message>
<message name="IDS_BRAVE_UI_MONTH_SEP" desc="">September</message>
<message name="IDS_BRAVE_UI_MONTHLY_TIPS" desc="">Monthly Tips!</message>
<message name="IDS_BRAVE_UI_MONTHLY_TIPS" desc="">Monthly Contributions!</message>
<message name="IDS_BRAVE_UI_NEW_GRANT" desc="">A free token grant is available.</message>
<message name="IDS_BRAVE_UI_GRANT_TITLE_UGP" desc="Title for a reward grant when it has been claimed">It's your lucky day!</message>
<message name="IDS_BRAVE_UI_GRANT_SUBTITLE_UGP" desc="Subtitle for a reward grant when it has been claimed">Your token grant is on its way.</message>
Expand Down Expand Up @@ -468,13 +468,13 @@
<message name="IDS_BRAVE_UI_PAYMENT" desc="">Payment</message>
<message name="IDS_BRAVE_UI_PAYMENT_MONTHLY" desc="">Payment made every {{day}}th day in each month.</message>
<message name="IDS_BRAVE_UI_PAYMENT_NOT_MADE" desc="">Payment not made.</message>
<message name="IDS_BRAVE_UI_PAYMENT_WARNING" desc="">When your balance is not enough to cover the combined total of Auto-Contribute and your recurring tips, these payments are skipped for this period.</message>
<message name="IDS_BRAVE_UI_PAYMENT_WARNING" desc="">When your balance is not enough to cover the combined total of Auto-Contribute and your monthly contributions, these payments are skipped for this period.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_HEADER" desc="">Pinned sites are now</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_MSG" desc="">Here's how monthly tips work:</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_ONE" desc="">Monthly tips do not come out of your Auto-Contribute payment. They're separate.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_MSG" desc="">Here's how monthly contributions work:</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_ONE" desc="">Monthly contributions do not come out of your Auto-Contribute payment. They're separate.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_TWO" desc="">Each site is paid a fixed amount monthly.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_THREE" desc="">Monthly tips are paid out all at once, each month. If you're using Auto-Contribute, tips go out at the same time as your monthly Auto-Contribute payment.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_FOUR" desc="">You can remove any site receiving monthly tips from inside of the Tips panel.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_THREE" desc="">Monthly contributions are paid out all at once, each month. If you're using Auto-Contribute, tips go out at the same time as your monthly Auto-Contribute payment.</message>
<message name="IDS_BRAVE_UI_PAYMENT_PINNED_SITES_FOUR" desc="">You can remove any site receiving monthly contributions from inside of the Tips panel.</message>
<message name="IDS_BRAVE_UI_PLEASE_NOTE" desc="">Please note:</message>
<message name="IDS_BRAVE_UI_PRINT" desc="">Print</message>
<message name="IDS_BRAVE_UI_PROCESSING_REQUEST" desc="">Your request is still being processed, please wait.</message>
Expand All @@ -484,8 +484,8 @@
<message name="IDS_BRAVE_UI_READY_TO_TAKE_PART_START" desc="">You can start with the</message>
<message name="IDS_BRAVE_UI_RECOVERY_KEYS" desc="">Recovery Key</message>
<message name="IDS_BRAVE_UI_RECURRING" desc="">Recurring</message>
<message name="IDS_BRAVE_UI_RECURRING_DONATION" desc="">Monthly Tips</message>
<message name="IDS_BRAVE_UI_RECURRING_DONATIONS" desc="">Monthly Tips</message>
<message name="IDS_BRAVE_UI_RECURRING_DONATION" desc="">Monthly Contributions</message>
<message name="IDS_BRAVE_UI_RECURRING_DONATIONS" desc="">Monthly Contributions</message>
<message name="IDS_BRAVE_UI_REDDIT_TIP_TITLE" desc="">Tip {{ user }} for their post:</message>
<message name="IDS_BRAVE_UI_REDDIT_TIP_TITLE_EMPTY" desc="We use this title when reddit text is empty">Tip {{ user }} for their post!</message>
<message name="IDS_BRAVE_UI_GITHUB_TIP_TITLE" desc="">Tip {{ user }} for their post:</message>
Expand All @@ -502,6 +502,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 @@ -596,7 +597,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 7390a1b

Please sign in to comment.