Skip to content

Commit

Permalink
Uplift of #17808 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-builds committed Apr 13, 2023
1 parent 3270cfe commit 3a05ede
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,26 @@ public void OnGetExternalWallet(String externalWallet) {
setPublisherNoteText(pubStatus, walletStatus);
}

private String getWalletStringFromType(String walletType) {
if (walletType.equals(BraveWalletProvider.UPHOLD)) {
return getResources().getString(R.string.uphold);
} else if (walletType.equals(BraveWalletProvider.GEMINI)) {
return getResources().getString(R.string.gemini);
} else {
return getResources().getString(R.string.bitflyer);
}
}

private String getWalletStringFromStatus(int pubStatus) {
if (pubStatus == PublisherStatus.UPHOLD_VERIFIED) {
return getResources().getString(R.string.uphold);
} else if (pubStatus == PublisherStatus.GEMINI_VERIFIED) {
return getResources().getString(R.string.gemini);
} else {
return getResources().getString(R.string.bitflyer);
}
}

@SuppressLint("ClickableViewAccessibility")
private void setPublisherNoteText(int pubStatus, int walletStatus) {
String notePart1 = "";
Expand All @@ -300,10 +320,9 @@ private void setPublisherNoteText(int pubStatus, int walletStatus) {
&& !walletType.equals(BraveWalletProvider.BITFLYER))
|| (pubStatus == PublisherStatus.GEMINI_VERIFIED
&& !walletType.equals(BraveWalletProvider.GEMINI))) {
notePart1 = getResources().getString(
R.string.brave_ui_site_banner_different_verified_notice_text);
Log.d(TAG,
"User is verified and publisher is verified but not with the same provider");
notePart1 = String.format(
getString(R.string.brave_ui_site_banner_different_verified_notice_text1),
getWalletStringFromType(walletType), getWalletStringFromStatus(pubStatus));
}
}

Expand Down
4 changes: 2 additions & 2 deletions browser/ui/android/strings/android_brave_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@ This file contains all "about" strings. It is set to NOT be translated, in tran
<message name="IDS_BRAVE_UI_SITE_BANNER_UNVERIFIED_NOTICE_TEXT" desc="A message on tipping page when a creator is not verified yet">
This creator has not yet signed up to receive contributions from Brave users. We'll keep trying to contribute until they verify, or until 90 days have passed.
</message>
<message name="IDS_BRAVE_UI_SITE_BANNER_DIFFERENT_VERIFIED_NOTICE_TEXT" desc="A message on tipping page when a creator is not verified yet">
NOTE: This creator is currently not configured to receive tips from your Rewards custodial wallet service. Any tip you make will remain pending and retry automatically for 90 days.
<message name="IDS_BRAVE_UI_SITE_BANNER_DIFFERENT_VERIFIED_NOTICE_TEXT1" desc="A message on tipping page when a creator is not verified yet">
You're connected to <ph name="WALLET_PROVIDER">%1$s</ph>, but this creator is connected to <ph name="SUPPORTED_WALLET_PROVIDER">%2$s</ph>. This means your tip can't reach this creator. For now, any tip you make will remain pending and retry automatically for 90 days.
</message>
<message name="IDS_BRAVE_UI_SITE_BANNER_WELCOME" desc="Tipping page title">
Welcome!
Expand Down

0 comments on commit 3a05ede

Please sign in to comment.