mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-13 14:41:53 +00:00
fix: rewrite user-facing messages in Buying module
Conservative cleanup of frappe.throw/msgprint messages per the message style
guide; meaning, severity, and .format() arguments are unchanged:
- index bare {} placeholders as {0}/{1}/... so translators can reorder
- move f-strings / .format() / concatenation out of _() (they break gettext
extraction and never translate)
- wrap translatable dynamic values (DocType/Select labels) in _()
- fix grammar and colloquialisms
- drop no-op _() wrapping runtime-built strings
Part of #53976.
This commit is contained in:
@@ -36,7 +36,7 @@ class SubcontractingService:
|
||||
)
|
||||
)
|
||||
if not item.fg_item_qty:
|
||||
frappe.throw(_("Row #{0}: Finished Good Item Qty can not be zero").format(item.idx))
|
||||
frappe.throw(_("Row #{0}: Finished Good Item Qty cannot be zero").format(item.idx))
|
||||
else:
|
||||
for item in doc.items:
|
||||
item.set("fg_item", None)
|
||||
|
||||
@@ -421,7 +421,7 @@ def check_portal_enabled(reference_doctype):
|
||||
if not frappe.db.get_value("Portal Menu Item", {"reference_doctype": reference_doctype}, "enabled"):
|
||||
frappe.throw(
|
||||
_(
|
||||
"The Access to Request for Quotation From Portal is Disabled. To Allow Access, Enable it in Portal Settings."
|
||||
"Access to Request for Quotation from the portal is disabled. To allow access, enable it in Portal Settings."
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -43,11 +43,11 @@ class SupplierScorecardVariable(Document):
|
||||
|
||||
import_string_path(self.path)
|
||||
except AttributeError:
|
||||
frappe.throw(_("Could not find path for " + self.path), VariablePathNotFound)
|
||||
frappe.throw(_("Could not find path for {0}").format(self.path), VariablePathNotFound)
|
||||
|
||||
else:
|
||||
if not hasattr(sys.modules[__name__], self.path):
|
||||
frappe.throw(_("Could not find path for " + self.path), VariablePathNotFound)
|
||||
frappe.throw(_("Could not find path for {0}").format(self.path), VariablePathNotFound)
|
||||
|
||||
|
||||
def get_total_workdays(scorecard):
|
||||
|
||||
Reference in New Issue
Block a user