Skip to content

Commit

Permalink
Update translations to adapt to new unified delay (#3409)
Browse files Browse the repository at this point in the history
  • Loading branch information
ripcurlx authored and sqrrm committed Oct 15, 2019
1 parent 3c23ad9 commit 8c41a19
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

@Slf4j
public class SignedWitnessService {
public static final long SIGNER_AGE_DAYS = 60;
public static final long SIGNER_AGE_DAYS = 30;
public static final long SIGNER_AGE = SIGNER_AGE_DAYS * ChronoUnit.DAYS.getDuration().toMillis();

private final KeyRing keyRing;
Expand Down
26 changes: 8 additions & 18 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ offerbook.timeSinceSigning.daysSinceSigning={0} days
offerbook.timeSinceSigning.daysSinceSigning.long={0} since signing

offerbook.timeSinceSigning.help=By trading with a payment account that was verified by an arbitrator or a peer, your account gets signed as well.\n\
30 days later the initial limit of 0.01 BTC gets lifted and after 60 days your account can sign other peers as well.
{0} days later the initial limit of {1} gets lifted and your account can sign other peers as well.
offerbook.timeSinceSigning.notSigned=Not signed yet
offerbook.timeSinceSigning.notSigned.noNeed=Unsigned
shared.notSigned=This account hasn't been signed yet
Expand Down Expand Up @@ -372,28 +372,18 @@ offerbook.warning.noTradingAccountForCurrency.msg=You don't have a trading accou
offerbook.warning.noMatchingAccount.headline=No matching trading account.
offerbook.warning.noMatchingAccount.msg=To take this offer, you will need to set up a payment account using this payment method.\n\nWould you like to do this now?

offerbook.warning.riskyBuyOfferWithImmatureAccountAge=This offer cannot be taken because of security restrictions based on the following criteria:\n\
- The maker''s payment account was created after March 1st 2019\n\
- The minimum trade amount is above 0.01 BTC\n\
- The payment method for the offer is considered risky for bank chargebacks\n\n{0}

offerbook.warning.sellOfferAndAnyTakerPaymentAccountForOfferMature=This offer cannot be taken because of security restrictions based on the following criteria:\n\
- Your payment account was created after March 1st 2019\n\
- The minimum trade amount is above 0.01 BTC\n\
- The payment method for this offer is considered risky for bank chargebacks\n\n{0}

offerbook.warning.counterpartyTradeRestrictions=This offer cannot be taken due to counterparty trade restrictions

offerbook.warning.newVersionAnnouncement=With this version of the software trading peers can verify and sign each other to create a network of trusted accounts.\n\n\
By trading with a peer that has already been verified your account will be signed after a successful trade as well and the limits will be lifted after a certain time frame based on the verification method.\n\n\
For more information on account signing, please visit our documentation section on docs.bisq.network/account-signing.

popup.warning.tradeLimitDueAccountAgeRestriction.seller=The allowed trade amount is limited to 0.01 BTC because of security restrictions based on the following criteria:\n\
popup.warning.tradeLimitDueAccountAgeRestriction.seller=The allowed trade amount is limited to {0} because of security restrictions based on the following criteria:\n\
- The buyers account was created after March 1st 2019\n\
- The payment method for this offer is considered risky for bank chargebacks\n\n{0}
popup.warning.tradeLimitDueAccountAgeRestriction.buyer=The allowed trade amount is limited to 0.01 BTC because of security restrictions based on the following criteria:\n\
- The payment method for this offer is considered risky for bank chargebacks\n\n{1}
popup.warning.tradeLimitDueAccountAgeRestriction.buyer=The allowed trade amount is limited to {0} because of security restrictions based on the following criteria:\n\
- Your payment account was created after March 1st 2019\n\
- The payment method for this offer is considered risky for bank chargebacks\n\n{0}
- The payment method for this offer is considered risky for bank chargebacks\n\n{1}

offerbook.warning.wrongTradeProtocol=That offer requires a different protocol version as the one used in your version of the software.\n\nPlease check if you have the latest version installed, otherwise the user who created the offer has used an older version.\n\nUsers cannot trade with an incompatible trade protocol version.
offerbook.warning.userIgnored=You have added that user's onion address to your ignore list.
Expand Down Expand Up @@ -2542,10 +2532,10 @@ popup.accountSigning.success.description=All {0} payment accounts were successfu
popup.accountSigning.generalInformation=You'll find the signing state of all your accounts in the account section.\n\n\
For further information please visit docs.bisq.network/account-signing.html.
popup.accountSigning.signedByArbitrator=One of your payment accounts has been verified and signed by an arbitrator. Trading with this account will automatically sign your trading peer''s account after a successful trade.\n\n{0}
popup.accountSigning.signedByPeer=One of your payment accounts has been verified and signed by a trading peer. Your initial limit will be lifted within 30 days from now. \
After 60 days you are able to sign other accounts as well.\n\n{0}
popup.accountSigning.signedByPeer=One of your payment accounts has been verified and signed by a trading peer. Your initial limit will be lifted and you''ll be able to sign other accounts within {0} days from now.\n\n{1}
popup.accountSigning.peerLimitLifted=The initial limit for one of your accounts has been lifted.\n\n{0}
popup.accountSigning.peerSigner=One of your accounts is mature enough to sign other payment accounts as well.\n\n{0}
popup.accountSigning.peerSigner=One of your accounts is mature enough to sign other payment accounts \
and the initial limit for one of your accounts has been lifted.\n\n{0}

####################################################################
# Notifications
Expand Down
3 changes: 2 additions & 1 deletion desktop/src/main/java/bisq/desktop/main/MainViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import bisq.desktop.util.DisplayUtils;
import bisq.desktop.util.GUIUtil;

import bisq.core.account.sign.SignedWitnessService;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.alert.PrivateNotificationManager;
import bisq.core.app.AppOptionKeys;
Expand Down Expand Up @@ -357,7 +358,7 @@ private void setupHandlers() {
bisqSetup.setDisplaySignedByArbitratorHandler(key -> accountPresentation.showOneTimeAccountSigningPopup(
key, "popup.accountSigning.signedByArbitrator"));
bisqSetup.setDisplaySignedByPeerHandler(key -> accountPresentation.showOneTimeAccountSigningPopup(
key, "popup.accountSigning.signedByPeer"));
key, "popup.accountSigning.signedByPeer", String.valueOf(SignedWitnessService.SIGNER_AGE_DAYS)));
bisqSetup.setDisplayPeerLimitLiftedHandler(key -> accountPresentation.showOneTimeAccountSigningPopup(
key, "popup.accountSigning.peerLimitLifted"));
bisqSetup.setDisplayPeerSignerHandler(key -> accountPresentation.showOneTimeAccountSigningPopup(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ void onFocusOutAmountTextField(boolean oldValue, boolean newValue) {
} else if (amount.get() != null && btcValidator.getMaxTradeLimit() != null && btcValidator.getMaxTradeLimit().value == OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT.value) {
amount.set(btcFormatter.formatCoin(btcValidator.getMaxTradeLimit()));
new Popup<>().information(Res.get("popup.warning.tradeLimitDueAccountAgeRestriction.buyer",
bsqFormatter.formatCoinWithCode(OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT),
Res.get("offerbook.warning.newVersionAnnouncement")))
.width(900)
.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import bisq.desktop.util.GUIUtil;
import bisq.desktop.util.Layout;

import bisq.core.account.sign.SignedWitnessService;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.alert.PrivateNotificationManager;
import bisq.core.app.AppOptionKeys;
Expand All @@ -53,6 +54,7 @@
import bisq.core.monetary.Volume;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;
import bisq.core.offer.OfferRestrictions;
import bisq.core.payment.PaymentAccount;
import bisq.core.payment.payload.PaymentMethod;
import bisq.core.user.DontShowAgainLookup;
Expand Down Expand Up @@ -1059,7 +1061,11 @@ public void updateItem(final OfferBookListItem newItem, boolean empty) {
}

private AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> getSigningStateColumn() {
AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>(Res.get("offerbook.timeSinceSigning"), Res.get("offerbook.timeSinceSigning.help")) {
AutoTooltipTableColumn<OfferBookListItem, OfferBookListItem> column = new AutoTooltipTableColumn<>(
Res.get("offerbook.timeSinceSigning"),
Res.get("offerbook.timeSinceSigning.help",
SignedWitnessService.SIGNER_AGE_DAYS,
formatter.formatCoinWithCode(OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT))) {
{
setMinWidth(60);
setSortable(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ void onFocusOutAmountTextField(boolean oldValue, boolean newValue, String userIn
} else if (btcValidator.getMaxTradeLimit() != null && btcValidator.getMaxTradeLimit().value == OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT.value) {
if (dataModel.getDirection() == OfferPayload.Direction.BUY) {
new Popup<>().information(Res.get("popup.warning.tradeLimitDueAccountAgeRestriction.seller",
bsqFormatter.formatCoinWithCode(OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT),
Res.get("offerbook.warning.newVersionAnnouncement")))
.width(900)
.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,21 @@ public void setup() {
}

public void showOneTimeAccountSigningPopup(String key, String s) {
showOneTimeAccountSigningPopup(key, s, null);
}

public void showOneTimeAccountSigningPopup(String key, String s, String optionalParam) {
if (!DevEnv.isDevMode()) {

DontShowAgainLookup.dontShowAgain(ACCOUNT_NEWS, false);
showNotification.set(true);

DontShowAgainLookup.dontShowAgain(key, true);
new Popup<>().information(Res.get(s,
Res.get("popup.accountSigning.generalInformation")))
String message = optionalParam != null ?
Res.get(s, optionalParam, Res.get("popup.accountSigning.generalInformation")) :
Res.get(s, Res.get("popup.accountSigning.generalInformation"));

new Popup<>().information(message)
.show();
}
}
Expand Down

0 comments on commit 8c41a19

Please sign in to comment.