mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 15:11:52 +00:00
Merge pull request #56476 from mihir-kandoi/messages/projects
chore: rewrite user-facing messages in projects module
This commit is contained in:
@@ -144,7 +144,7 @@ class Task(NestedSet):
|
||||
if frappe.db.get_value("Task", d.task, "status") not in ("Completed", "Cancelled"):
|
||||
frappe.throw(
|
||||
_(
|
||||
"Cannot complete task {0} as its dependant task {1} are not completed / cancelled."
|
||||
"Cannot complete task {0} as its dependent task {1} is not completed / cancelled."
|
||||
).format(frappe.bold(self.name), frappe.bold(d.task))
|
||||
)
|
||||
|
||||
@@ -316,7 +316,7 @@ class Task(NestedSet):
|
||||
|
||||
def on_trash(self):
|
||||
if check_if_child_exists(self.name):
|
||||
throw(_("Child Task exists for this Task. You can not delete this Task."))
|
||||
throw(_("Child Task exists for this Task. You cannot delete this Task."))
|
||||
|
||||
self.update_nsm_model()
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ class TimesheetDetail(Document):
|
||||
def validate_dates(self):
|
||||
"""Validate that to_time is not before from_time."""
|
||||
if self.from_time and self.to_time and time_diff_in_hours(self.to_time, self.from_time) < 0:
|
||||
frappe.throw(_("To Time cannot be before from date"))
|
||||
frappe.throw(_("To Time cannot be before From Time"))
|
||||
|
||||
def validate_parent_project(self, parent_project: str):
|
||||
"""Validate that project is same as Timesheet's parent project."""
|
||||
|
||||
Reference in New Issue
Block a user