Get rid of hard coded strings in account payloads

This commit is contained in:
Christoph Atteneder 2018-11-28 17:39:14 +01:00
parent 5c804018ab
commit eb876576d7
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
29 changed files with 127 additions and 65 deletions

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -89,7 +91,7 @@ public final class AdvancedCashAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Advanced Cash - Wallet ID: " + accountNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.wallet") + " " + accountNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -86,7 +88,7 @@ public final class AliPayAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "AliPay - Account no.: " + accountNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.no") + " " + accountNr;
} }
@Override @Override

View file

@ -19,6 +19,7 @@ package bisq.core.payment.payload;
import bisq.core.locale.BankUtil; import bisq.core.locale.BankUtil;
import bisq.core.locale.CountryUtil; import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
@ -123,21 +124,21 @@ public abstract class BankAccountPayload extends CountryBasedPaymentAccountPaylo
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
String bankName = BankUtil.isBankNameRequired(countryCode) ? String bankName = BankUtil.isBankNameRequired(countryCode) ?
BankUtil.getBankNameLabel(countryCode) + " " + this.bankName + "\n" : ""; BankUtil.getBankNameLabel(countryCode) + ": " + this.bankName + "\n" : "";
String bankId = BankUtil.isBankIdRequired(countryCode) ? String bankId = BankUtil.isBankIdRequired(countryCode) ?
BankUtil.getBankIdLabel(countryCode) + " " + this.bankId + "\n" : ""; BankUtil.getBankIdLabel(countryCode) + ": " + this.bankId + "\n" : "";
String branchId = BankUtil.isBranchIdRequired(countryCode) ? String branchId = BankUtil.isBranchIdRequired(countryCode) ?
BankUtil.getBranchIdLabel(countryCode) + " " + this.branchId + "\n" : ""; BankUtil.getBranchIdLabel(countryCode) + ": " + this.branchId + "\n" : "";
String nationalAccountId = BankUtil.isNationalAccountIdRequired(countryCode) ? String nationalAccountId = BankUtil.isNationalAccountIdRequired(countryCode) ?
BankUtil.getNationalAccountIdLabel(countryCode) + " " + this.nationalAccountId + "\n" : ""; BankUtil.getNationalAccountIdLabel(countryCode) + ": " + this.nationalAccountId + "\n" : "";
String accountNr = BankUtil.isAccountNrRequired(countryCode) ? String accountNr = BankUtil.isAccountNrRequired(countryCode) ?
BankUtil.getAccountNrLabel(countryCode) + " " + this.accountNr + "\n" : ""; BankUtil.getAccountNrLabel(countryCode) + ": " + this.accountNr + "\n" : "";
String accountType = BankUtil.isAccountTypeRequired(countryCode) ? String accountType = BankUtil.isAccountTypeRequired(countryCode) ?
BankUtil.getAccountTypeLabel(countryCode) + " " + this.accountType + "\n" : ""; BankUtil.getAccountTypeLabel(countryCode) + ": " + this.accountType + "\n" : "";
String holderTaxIdString = BankUtil.isHolderIdRequired(countryCode) ? String holderTaxIdString = BankUtil.isHolderIdRequired(countryCode) ?
(BankUtil.getHolderIdLabel(countryCode) + " " + holderTaxId + "\n") : ""; (BankUtil.getHolderIdLabel(countryCode) + ": " + holderTaxId + "\n") : "";
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
bankName + bankName +
bankId + bankId +
branchId + branchId +
@ -145,7 +146,7 @@ public abstract class BankAccountPayload extends CountryBasedPaymentAccountPaylo
accountNr + accountNr +
accountType + accountType +
holderTaxIdString + holderTaxIdString +
"Country of bank: " + CountryUtil.getNameByCode(countryCode); Res.getWithCol("payment.bank.country") + " " + CountryUtil.getNameByCode(countryCode);
} }
protected String getHolderIdLabel() { protected String getHolderIdLabel() {

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -89,7 +91,7 @@ public final class CashAppAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "CashApp - Account: " + cashTag; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account") + " " + cashTag;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -94,13 +96,13 @@ public final class ChaseQuickPayAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Chase QuickPay - Holder name: " + holderName + ", email: " + email; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " + Res.get("payment.email") + " " + email;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"Email: " + email; Res.getWithCol("payment.email") + " " + email;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -94,13 +96,13 @@ public final class ClearXchangeAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Zelle (ClearXchange) - Holder name: " + holderName + ", Email or mobile no.: " + emailOrMobileNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " + Res.getWithCol("payment.emailOrMobile") + " " + emailOrMobileNr;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"Email or mobile no.: " + emailOrMobileNr; Res.getWithCol("payment.emailOrMobile") + " " + emailOrMobileNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -88,7 +90,7 @@ public final class CryptoCurrencyAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Receivers altcoin address: " + address; return Res.getWithCol("payment.altcoin.receiver.address") + " " + address;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -109,7 +111,9 @@ public final class F2FAccountPayload extends CountryBasedPaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Face to Face - Contact: " + contact + ", city: " + city + ", additional information: " + extraInfo; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.f2f.contact") + " " + contact + ", " +
Res.getWithCol("payment.f2f.city") + " " + city +
", " + Res.getWithCol("payment.f2f.extra") + " " + extraInfo;
} }
@ -117,7 +121,7 @@ public final class F2FAccountPayload extends CountryBasedPaymentAccountPayload {
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
// We don't show here more as the makers extra data are the relevant for the trade. City has to be anyway the // We don't show here more as the makers extra data are the relevant for the trade. City has to be anyway the
// same for maker and taker. // same for maker and taker.
return "Contact details: " + contact; return Res.getWithCol("payment.f2f.contact") + " " + contact;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -101,13 +103,13 @@ public final class FasterPaymentsAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "FasterPayments - UK Sort code: " + sortCode + ", Account number: " + accountNr; return Res.get(paymentMethodId) + " - UK Sort code: " + sortCode + ", " + Res.getWithCol("payment.accountNr") + " " + accountNr;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "UK Sort code: " + sortCode + "\n" + return "UK Sort code: " + sortCode + "\n" +
"Account number: " + accountNr; Res.getWithCol("payment.accountNr") + " " + accountNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -87,12 +89,12 @@ public final class HalCashAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "HalCash - Mobile no.: " + mobileNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.mobile") + " " + mobileNr;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Mobile no.: " + mobileNr; return Res.getWithCol("payment.mobile") + " " + mobileNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -105,15 +107,17 @@ public final class InteracETransferAccountPayload extends PaymentAccountPayload
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Interac e-Transfer - Holder name: " + holderName + ", email: " + email + ", secret question: " + question + ", answer: " + answer; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
Res.get("payment.email") + " " + email + ", " + Res.getWithCol("payment.secret") + " " +
question + ", " + Res.getWithCol("payment.answer") + " " + answer;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"Email: " + email + "\n" + Res.getWithCol("payment.email") + " " + email + "\n" +
"Secret question: " + question + "\n" + Res.getWithCol("payment.secret") + " " + question + "\n" +
"Answer: " + answer; Res.getWithCol("payment.answer") + " " + answer;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -87,7 +89,7 @@ public final class MoneyBeamAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "MoneyBeam - Account: " + accountId; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account") + " " + accountId;
} }
@Override @Override

View file

@ -19,6 +19,7 @@ package bisq.core.payment.payload;
import bisq.core.locale.BankUtil; import bisq.core.locale.BankUtil;
import bisq.core.locale.CountryUtil; import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
@ -110,16 +111,17 @@ public class MoneyGramAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "MoneyGram - " + getPaymentDetailsForTradePopup().replace("\n", ", "); return Res.get(paymentMethodId) + " - " + getPaymentDetailsForTradePopup().replace("\n", ", ");
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
String state = BankUtil.isStateRequired(countryCode) ? ("State: " + this.state + "\n") : ""; String state = BankUtil.isStateRequired(countryCode) ? (Res.getWithCol("payment.account.state") +
return "Full name: " + holderName + "\n" + " " + this.state + "\n") : "";
return Res.getWithCol("payment.account.fullName") + " " + holderName + "\n" +
state + state +
"Country: " + CountryUtil.getNameByCode(countryCode) + "\n" + Res.getWithCol("payment.account.country") + " " + CountryUtil.getNameByCode(countryCode) + "\n" +
"Email: " + email; Res.getWithCol("payment.email") + " " + email;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -110,6 +112,6 @@ public final class NationalBankAccountPayload extends BankAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "National Bank transfer - " + getPaymentDetailsForTradePopup().replace("\n", ", "); return Res.get(paymentMethodId) + " - " + getPaymentDetailsForTradePopup().replace("\n", ", ");
} }
} }

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -88,7 +90,7 @@ public final class OKPayAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "OKPay - Account no.: " + accountNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.no") + " " + accountNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -89,7 +91,7 @@ public final class PerfectMoneyAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "PerfectMoney - Account no.: " + accountNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.no") + " " + accountNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -92,7 +94,8 @@ public final class PopmoneyAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Popmoney - Holder name: " + holderName + ", email or phone no.: " + accountId; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
Res.getWithCol("payment.popmoney.accountId") + " " + accountId;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -88,7 +90,7 @@ public final class PromptPayAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "PromptPay ID: " + promptPayId; return Res.getWithCol("payment.promptPay.promptPayId") + promptPayId;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -115,6 +117,6 @@ public final class SameBankAccountPayload extends BankAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Transfer with same Bank - " + getPaymentDetailsForTradePopup().replace("\n", ", "); return Res.get(paymentMethodId) + " - " + getPaymentDetailsForTradePopup().replace("\n", ", ");
} }
} }

View file

@ -19,6 +19,7 @@ package bisq.core.payment.payload;
import bisq.core.locale.Country; import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil; import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
@ -146,15 +147,15 @@ public final class SepaAccountPayload extends CountryBasedPaymentAccountPayload
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "SEPA - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", Country code: " + getCountryCode(); return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", " + Res.getWithCol("payment.bank.country") + " " + getCountryCode();
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"IBAN: " + iban + "\n" + "IBAN: " + iban + "\n" +
"BIC: " + bic + "\n" + "BIC: " + bic + "\n" +
"Country of bank: " + CountryUtil.getNameByCode(countryCode); Res.getWithCol("payment.bank.country") + " " + CountryUtil.getNameByCode(countryCode);
} }
@Override @Override

View file

@ -19,6 +19,7 @@ package bisq.core.payment.payload;
import bisq.core.locale.Country; import bisq.core.locale.Country;
import bisq.core.locale.CountryUtil; import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
@ -141,15 +142,16 @@ public final class SepaInstantAccountPayload extends CountryBasedPaymentAccountP
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "SEPA Instant - Holder name: " + holderName + ", IBAN: " + iban + ", BIC: " + bic + ", Country code: " + getCountryCode(); return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", IBAN: " +
iban + ", BIC: " + bic + ", " + Res.getWithCol("payment.bank.country") + " " + getCountryCode();
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"IBAN: " + iban + "\n" + "IBAN: " + iban + "\n" +
"BIC: " + bic + "\n" + "BIC: " + bic + "\n" +
"Country of bank: " + CountryUtil.getNameByCode(countryCode); Res.getWithCol("payment.bank.country") + " " + CountryUtil.getNameByCode(countryCode);
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -139,12 +141,12 @@ public final class SpecificBanksAccountPayload extends BankAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Transfers with specific banks - " + getPaymentDetailsForTradePopup().replace("\n", ", "); return Res.get(paymentMethodId) + " - " + getPaymentDetailsForTradePopup().replace("\n", ", ");
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return super.getPaymentDetailsForTradePopup() + "\n" + return super.getPaymentDetailsForTradePopup() + "\n" +
"Accepted banks: " + Joiner.on(", ").join(acceptedBanks); Res.getWithCol("payment.accepted.banks") + " " + Joiner.on(", ").join(acceptedBanks);
} }
} }

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -92,13 +94,14 @@ public final class SwishAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Swish - Holder name: " + holderName + ", mobile no.: " + mobileNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName +
", " + Res.getWithCol("payment.mobile") + " " + mobileNr;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"Mobile no.: " + mobileNr; Res.getWithCol("payment.mobile") + " " + mobileNr;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -94,14 +96,15 @@ public final class USPostalMoneyOrderAccountPayload extends PaymentAccountPayloa
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "US Postal Money Order - Holder name: " + holderName + ", postal address: " + postalAddress; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
Res.getWithCol("payment.postal.address") + " " + postalAddress;
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
return "Holder name: " + holderName + "\n" + return Res.getWithCol("payment.account.owner") + " " + holderName + "\n" +
"Postal address: " + postalAddress; Res.getWithCol("payment.postal.address") + " " + postalAddress;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -87,7 +89,7 @@ public final class UpholdAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Uphold - Account: " + accountId; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account") + " " + accountId;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -94,7 +96,8 @@ public final class VenmoAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Venmo - Holder name: " + holderName + ", Venmo username: " + venmoUserName; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.owner") + " " + holderName + ", " +
Res.getWithCol("payment.venmo.venmoUserName") + " " + venmoUserName;
} }
@Override @Override

View file

@ -17,6 +17,8 @@
package bisq.core.payment.payload; package bisq.core.payment.payload;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
import com.google.protobuf.Message; import com.google.protobuf.Message;
@ -86,7 +88,7 @@ public final class WeChatPayAccountPayload extends PaymentAccountPayload {
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "WeChat Pay - Account no.: " + accountNr; return Res.get(paymentMethodId) + " - " + Res.getWithCol("payment.account.no") + " " + accountNr;
} }
@Override @Override

View file

@ -19,6 +19,7 @@ package bisq.core.payment.payload;
import bisq.core.locale.BankUtil; import bisq.core.locale.BankUtil;
import bisq.core.locale.CountryUtil; import bisq.core.locale.CountryUtil;
import bisq.core.locale.Res;
import io.bisq.generated.protobuffer.PB; import io.bisq.generated.protobuffer.PB;
@ -117,17 +118,17 @@ public class WesternUnionAccountPayload extends CountryBasedPaymentAccountPayloa
@Override @Override
public String getPaymentDetails() { public String getPaymentDetails() {
return "Western Union - " + getPaymentDetailsForTradePopup().replace("\n", ", "); return Res.get(paymentMethodId) + " - " + getPaymentDetailsForTradePopup().replace("\n", ", ");
} }
@Override @Override
public String getPaymentDetailsForTradePopup() { public String getPaymentDetailsForTradePopup() {
String cityState = BankUtil.isStateRequired(countryCode) ? ("City / State: " + city + " / " + state + "\n") String cityState = BankUtil.isStateRequired(countryCode) ? (Res.get("payment.account.city") + " / " + Res.getWithCol("payment.account.state") + " " + city + " / " + state + "\n")
: ("City: " + city + "\n"); : (Res.getWithCol("payment.account.city") + " " + city + "\n");
return "Full name: " + holderName + "\n" + return Res.getWithCol("payment.account.fullName") + " " + holderName + "\n" +
cityState + cityState +
"County: " + CountryUtil.getNameByCode(countryCode) + "\n" + Res.getWithCol("payment.country") + " " + CountryUtil.getNameByCode(countryCode) + "\n" +
"Email: " + email; Res.getWithCol("payment.email") + " " + email;
} }
@Override @Override

View file

@ -2281,6 +2281,7 @@ payment.national.account.id.AR=CBU number
#new #new
payment.altcoin.address.dyn={0} address payment.altcoin.address.dyn={0} address
payment.altcoin.receiver.address=Receiver's altcoin address
payment.accountNr=Account number payment.accountNr=Account number
payment.emailOrMobile=Email or mobile nr payment.emailOrMobile=Email or mobile nr
payment.useCustomAccountName=Use custom account name payment.useCustomAccountName=Use custom account name