Skip to content

Commit fa2cce4

Browse files
author
MarcoFalke
committed
wallet: Remove trailing whitespace from potential translation strings
If the potential translation strings are translated in the future, trailing whitespace is going to make translation effort harder.
1 parent fa59cc1 commit fa2cce4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/wallet/feebumper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Result CreateRateBumpTransaction(CWallet& wallet, const uint256& txid, const CCo
220220
int change_pos_in_out = -1; // No requested location for change
221221
bilingual_str fail_reason;
222222
if (!wallet.CreateTransaction(recipients, tx_new, fee_ret, change_pos_in_out, fail_reason, new_coin_control, false)) {
223-
errors.push_back(Untranslated("Unable to create transaction: ") + Untranslated(" ") + fail_reason);
223+
errors.push_back(Untranslated("Unable to create transaction.") + Untranslated(" ") + fail_reason);
224224
return Result::WALLET_ERROR;
225225
}
226226

src/wallet/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const WalletLocati
154154
{
155155
try {
156156
if (!CWallet::Verify(chain, location, false, error, warnings)) {
157-
error = Untranslated("Wallet file verification failed: ") + error;
157+
error = Untranslated("Wallet file verification failed.") + Untranslated(" ") + error;
158158
return nullptr;
159159
}
160160

161161
std::shared_ptr<CWallet> wallet = CWallet::CreateWalletFromFile(chain, location, error, warnings);
162162
if (!wallet) {
163-
error = Untranslated("Wallet loading failed: ") + error;
163+
error = Untranslated("Wallet loading failed.") + Untranslated(" ") + error;
164164
return nullptr;
165165
}
166166
AddWallet(wallet);

test/functional/wallet_bumpfee.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def test_maxtxfee_fails(self, rbf_node, dest_address):
300300
self.restart_node(1, ['-maxtxfee=0.000025'] + self.extra_args[1])
301301
rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)
302302
rbfid = spend_one_input(rbf_node, dest_address)
303-
assert_raises_rpc_error(-4, "Unable to create transaction: Fee exceeds maximum configured by -maxtxfee", rbf_node.bumpfee, rbfid)
303+
assert_raises_rpc_error(-4, "Unable to create transaction. Fee exceeds maximum configured by -maxtxfee", rbf_node.bumpfee, rbfid)
304304
self.restart_node(1, self.extra_args[1])
305305
rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)
306306

@@ -517,7 +517,7 @@ def test_no_more_inputs_fails(self, rbf_node, dest_address):
517517
rbf_node.generatetoaddress(1, dest_address)
518518
# spend all funds, no change output
519519
rbfid = rbf_node.sendtoaddress(rbf_node.getnewaddress(), rbf_node.getbalance(), "", "", True)
520-
assert_raises_rpc_error(-4, "Unable to create transaction: Insufficient funds", rbf_node.bumpfee, rbfid)
520+
assert_raises_rpc_error(-4, "Unable to create transaction. Insufficient funds", rbf_node.bumpfee, rbfid)
521521

522522

523523
if __name__ == "__main__":

test/functional/wallet_multiwallet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ def wallet_file(name):
227227
assert_raises_rpc_error(-18, 'Wallet wallets not found.', self.nodes[0].loadwallet, 'wallets')
228228

229229
# Fail to load duplicate wallets
230-
assert_raises_rpc_error(-4, 'Wallet file verification failed: Error loading wallet w1. Duplicate -wallet filename specified.', self.nodes[0].loadwallet, wallet_names[0])
230+
assert_raises_rpc_error(-4, 'Wallet file verification failed. Error loading wallet w1. Duplicate -wallet filename specified.', self.nodes[0].loadwallet, wallet_names[0])
231231

232232
# Fail to load duplicate wallets by different ways (directory and filepath)
233-
assert_raises_rpc_error(-4, "Wallet file verification failed: Error loading wallet wallet.dat. Duplicate -wallet filename specified.", self.nodes[0].loadwallet, 'wallet.dat')
233+
assert_raises_rpc_error(-4, "Wallet file verification failed. Error loading wallet wallet.dat. Duplicate -wallet filename specified.", self.nodes[0].loadwallet, 'wallet.dat')
234234

235235
# Fail to load if one wallet is a copy of another
236236
assert_raises_rpc_error(-4, "BerkeleyBatch: Can't open database w8_copy (duplicates fileid", self.nodes[0].loadwallet, 'w8_copy')
@@ -240,7 +240,7 @@ def wallet_file(name):
240240

241241

242242
# Fail to load if wallet file is a symlink
243-
assert_raises_rpc_error(-4, "Wallet file verification failed: Invalid -wallet path 'w8_symlink'", self.nodes[0].loadwallet, 'w8_symlink')
243+
assert_raises_rpc_error(-4, "Wallet file verification failed. Invalid -wallet path 'w8_symlink'", self.nodes[0].loadwallet, 'w8_symlink')
244244

245245
# Fail to load if a directory is specified that doesn't contain a wallet
246246
os.mkdir(wallet_dir('empty_wallet_dir'))

0 commit comments

Comments
 (0)