From 07c9b990728ceba5b74bc81c4155e36bf19d9c77 Mon Sep 17 00:00:00 2001 From: akiratfli Date: Tue, 28 Mar 2023 19:50:54 +0800 Subject: [PATCH] fix: bad strings format for update-translations (#34592) Co-authored-by: justin.li --- .../doctype/bank_transaction/bank_transaction.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py index 15162376c1..fcbaf329f5 100644 --- a/erpnext/accounts/doctype/bank_transaction/bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/bank_transaction.py @@ -46,7 +46,7 @@ class BankTransaction(StatusUpdater): def add_payment_entries(self, vouchers): "Add the vouchers with zero allocation. Save() will perform the allocations and clearance" if 0.0 >= self.unallocated_amount: - frappe.throw(frappe._(f"Bank Transaction {self.name} is already fully reconciled")) + frappe.throw(frappe._("Bank Transaction {0} is already fully reconciled").format(self.name)) added = False for voucher in vouchers: @@ -114,9 +114,7 @@ class BankTransaction(StatusUpdater): elif 0.0 > unallocated_amount: self.db_delete_payment_entry(payment_entry) - frappe.throw( - frappe._(f"Voucher {payment_entry.payment_entry} is over-allocated by {unallocated_amount}") - ) + frappe.throw(frappe._("Voucher {0} is over-allocated by {1}").format(unallocated_amount)) self.reload() @@ -178,7 +176,9 @@ def get_clearance_details(transaction, payment_entry): if gle["gl_account"] == gl_bank_account: if gle["amount"] <= 0.0: frappe.throw( - frappe._(f"Voucher {payment_entry.payment_entry} value is broken: {gle['amount']}") + frappe._("Voucher {0} value is broken: {1}").format( + payment_entry.payment_entry, gle["amount"] + ) ) unmatched_gles -= 1