fix: translatability of boldened text

(cherry picked from commit af0ae930ca)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
This commit is contained in:
barredterra
2024-08-16 21:38:56 +02:00
committed by Mergify
parent 8514c01a91
commit 4914481105
19 changed files with 54 additions and 50 deletions

View File

@@ -233,8 +233,13 @@ class AccountsController(TransactionBase):
).format(
frappe.bold(document_type),
get_link_to_form(self.doctype, self.get("return_against")),
<<<<<<< HEAD
frappe.bold("Update Outstanding for Self"),
get_link_to_form("Payment Reconciliation", "Payment Reconciliation"),
=======
frappe.bold(_("Update Outstanding for Self")),
get_link_to_form("Payment Reconciliation"),
>>>>>>> af0ae930ca (fix: translatability of boldened text)
)
)
@@ -1962,7 +1967,9 @@ class AccountsController(TransactionBase):
def raise_missing_debit_credit_account_error(self, party_type, party):
"""Raise an error if debit to/credit to account does not exist."""
db_or_cr = frappe.bold("Debit To") if self.doctype == "Sales Invoice" else frappe.bold("Credit To")
db_or_cr = (
frappe.bold(_("Debit To")) if self.doctype == "Sales Invoice" else frappe.bold(_("Credit To"))
)
rec_or_pay = "Receivable" if self.doctype == "Sales Invoice" else "Payable"
link_to_party = frappe.utils.get_link_to_form(party_type, party)
@@ -3085,9 +3092,9 @@ def set_order_defaults(parent_doctype, parent_doctype_name, child_doctype, child
child_item.warehouse = get_item_warehouse(item, p_doc, overwrite_warehouse=True)
if not child_item.warehouse:
frappe.throw(
_("Cannot find {} for item {}. Please set the same in Item Master or Stock Settings.").format(
frappe.bold("default warehouse"), frappe.bold(item.item_code)
)
_(
"Cannot find a default warehouse for item {0}. Please set one in the Item Master or in Stock Settings."
).format(frappe.bold(item.item_code))
)
set_child_tax_template_and_map(item, child_item, p_doc)