fix(i18n): translate get_label results at presentation with DocType context (#57217)

This commit is contained in:
Raffael Meyer
2026-08-21 23:19:36 +02:00
committed by GitHub
parent 275844d496
commit eae36c2d67
41 changed files with 177 additions and 99 deletions

View File

@@ -215,7 +215,7 @@ class SellingController(StockController):
if not (0 <= self.commission_rate <= 100.0):
throw(
"{} {}".format(
_(self.meta.get_label("commission_rate")),
_(self.meta.get_label("commission_rate"), context=self.doctype),
_("must be between 0 and 100"),
)
)
@@ -306,7 +306,12 @@ class SellingController(StockController):
bold(ref_rate_field),
bold("net rate"),
bold(rate),
bold(frappe.get_meta("Selling Settings").get_label("validate_selling_price")),
bold(
_(
frappe.get_meta("Selling Settings").get_label("validate_selling_price"),
context="Selling Settings",
)
),
get_link_to_form("Selling Settings"),
),
title=_("Invalid Selling Price"),