Skip to content

Commit 8f6095d

Browse files
barredterraruthra-kumar
authored andcommitted
fix(accounts_controller): make return message translatable
(cherry picked from commit 0209f0f) # Conflicts: # erpnext/controllers/accounts_controller.py
1 parent e60064f commit 8f6095d

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

erpnext/controllers/accounts_controller.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ def validate_against_voucher_outstanding(self):
184184

185185
msg = ""
186186
if self.get("update_outstanding_for_self"):
187-
msg = (
188-
"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, "
189-
"uncheck '{2}' checkbox. <br><br>Or"
187+
msg = _(
188+
"We can see {0} is made against {1}. If you want {1}'s outstanding to be updated, uncheck the '{2}' checkbox."
190189
).format(
191190
frappe.bold(document_type),
192191
get_link_to_form(self.doctype, self.get("return_against")),
@@ -197,20 +196,20 @@ def validate_against_voucher_outstanding(self):
197196
abs(flt(self.rounded_total) or flt(self.grand_total)) > flt(against_voucher_outstanding)
198197
):
199198
self.update_outstanding_for_self = 1
200-
msg = (
201-
"The outstanding amount {} in {} is lesser than {}. Updating the outstanding to this invoice. <br><br>And"
199+
msg = _(
200+
"The outstanding amount {0} in {1} is lesser than {2}. Updating the outstanding to this invoice."
202201
).format(
203202
against_voucher_outstanding,
204203
get_link_to_form(self.doctype, self.get("return_against")),
205204
flt(abs(self.outstanding_amount)),
206205
)
207206

208207
if msg:
209-
msg += " you can use {} tool to reconcile against {} later.".format(
208+
msg += "<br><br>" + _("You can use {0} to reconcile against {1} later.").format(
210209
get_link_to_form("Payment Reconciliation", "Payment Reconciliation"),
211210
get_link_to_form(self.doctype, self.get("return_against")),
212211
)
213-
frappe.msgprint(_(msg))
212+
frappe.msgprint(msg)
214213

215214
def validate(self):
216215
if not self.get("is_return") and not self.get("is_debit_note"):

0 commit comments

Comments
 (0)