Skip to content

Commit e43a547

Browse files
committed
refactor: wallet, do not translate init arguments names
1 parent 73b6171 commit e43a547

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/wallet/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
849849
}
850850
if (feeCalc.reason == FeeReason::FALLBACK && !wallet.m_allow_fallback_fee) {
851851
// eventually allow a fallback fee
852-
return util::Error{_("Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.")};
852+
return util::Error{strprintf(_("Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable %s."), "-fallbackfee")};
853853
}
854854

855855
// Calculate the cost of change

src/wallet/wallet.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
29352935
if (args.IsArgSet("-fallbackfee")) {
29362936
std::optional<CAmount> fallback_fee = ParseMoney(args.GetArg("-fallbackfee", ""));
29372937
if (!fallback_fee) {
2938-
error = strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), args.GetArg("-fallbackfee", ""));
2938+
error = strprintf(_("Invalid amount for %s=<amount>: '%s'"), "-fallbackfee", args.GetArg("-fallbackfee", ""));
29392939
return nullptr;
29402940
} else if (fallback_fee.value() > HIGH_TX_FEE_PER_KB) {
29412941
warnings.push_back(AmountHighWarn("-fallbackfee") + Untranslated(" ") +
@@ -2950,7 +2950,7 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
29502950
if (args.IsArgSet("-discardfee")) {
29512951
std::optional<CAmount> discard_fee = ParseMoney(args.GetArg("-discardfee", ""));
29522952
if (!discard_fee) {
2953-
error = strprintf(_("Invalid amount for -discardfee=<amount>: '%s'"), args.GetArg("-discardfee", ""));
2953+
error = strprintf(_("Invalid amount for %s=<amount>: '%s'"), "-discardfee", args.GetArg("-discardfee", ""));
29542954
return nullptr;
29552955
} else if (discard_fee.value() > HIGH_TX_FEE_PER_KB) {
29562956
warnings.push_back(AmountHighWarn("-discardfee") + Untranslated(" ") +
@@ -2972,8 +2972,8 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
29722972
walletInstance->m_pay_tx_fee = CFeeRate{pay_tx_fee.value(), 1000};
29732973

29742974
if (chain && walletInstance->m_pay_tx_fee < chain->relayMinFee()) {
2975-
error = strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
2976-
args.GetArg("-paytxfee", ""), chain->relayMinFee().ToString());
2975+
error = strprintf(_("Invalid amount for %s=<amount>: '%s' (must be at least %s)"),
2976+
"-paytxfee", args.GetArg("-paytxfee", ""), chain->relayMinFee().ToString());
29772977
return nullptr;
29782978
}
29792979
}
@@ -2984,12 +2984,12 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
29842984
error = AmountErrMsg("maxtxfee", args.GetArg("-maxtxfee", ""));
29852985
return nullptr;
29862986
} else if (max_fee.value() > HIGH_MAX_TX_FEE) {
2987-
warnings.push_back(_("-maxtxfee is set very high! Fees this large could be paid on a single transaction."));
2987+
warnings.push_back(strprintf(_("%s is set very high! Fees this large could be paid on a single transaction."), "-maxtxfee"));
29882988
}
29892989

29902990
if (chain && CFeeRate{max_fee.value(), 1000} < chain->relayMinFee()) {
2991-
error = strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)"),
2992-
args.GetArg("-maxtxfee", ""), chain->relayMinFee().ToString());
2991+
error = strprintf(_("Invalid amount for %s=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)"),
2992+
"-maxtxfee", args.GetArg("-maxtxfee", ""), chain->relayMinFee().ToString());
29932993
return nullptr;
29942994
}
29952995

0 commit comments

Comments
 (0)