diff --git a/hrms/hr/doctype/appraisal_cycle/appraisal_cycle.py b/hrms/hr/doctype/appraisal_cycle/appraisal_cycle.py
index ae2a187a75..891f162ccb 100644
--- a/hrms/hr/doctype/appraisal_cycle/appraisal_cycle.py
+++ b/hrms/hr/doctype/appraisal_cycle/appraisal_cycle.py
@@ -197,11 +197,11 @@ def create_appraisals_for_cycle(appraisal_cycle: AppraisalCycle, publish_progres
def validate_active_appraisal_cycle(appraisal_cycle: str) -> None:
if frappe.db.get_value("Appraisal Cycle", appraisal_cycle, "status") == "Completed":
- msg = _("Cannot create or change transactions against a {0} Appraisal Cycle.").format(
- frappe.bold("Completed")
+ msg = _("Cannot create or change transactions against an Appraisal Cycle with status {0}.").format(
+ frappe.bold(_("Completed"))
)
msg += "
"
- msg += _("Mark the cycle as {0} if required.").format(frappe.bold("In Progress"))
+ msg += _("Set the status to {0} if required.").format(frappe.bold(_("In Progress")))
frappe.throw(msg, title=_("Not Allowed"))
diff --git a/hrms/hr/doctype/exit_interview/exit_interview.py b/hrms/hr/doctype/exit_interview/exit_interview.py
index ebfcd82e43..8ede4f58f0 100644
--- a/hrms/hr/doctype/exit_interview/exit_interview.py
+++ b/hrms/hr/doctype/exit_interview/exit_interview.py
@@ -118,8 +118,8 @@ def validate_questionnaire_settings():
if not settings.exit_questionnaire_web_form or not settings.exit_questionnaire_notification_template:
frappe.throw(
_("Please set {0} and {1} in {2}.").format(
- frappe.bold("Exit Questionnaire Web Form"),
- frappe.bold("Notification Template"),
+ frappe.bold(_("Exit Questionnaire Web Form")),
+ frappe.bold(_("Notification Template")),
get_link_to_form("HR Settings", "HR Settings"),
),
title=_("Settings Missing"),
@@ -129,12 +129,12 @@ def validate_questionnaire_settings():
def show_email_summary(email_success, email_failure):
message = ""
if email_success:
- message += _("{0}: {1}").format(frappe.bold("Sent Successfully"), ", ".join(email_success))
+ message += _("Sent Successfully: {0}").format(", ".join(email_success))
if message and email_failure:
message += "
"
if email_failure:
- message += _("{0} due to missing email information for employee(s): {1}").format(
- frappe.bold("Sending Failed"), ", ".join(email_failure)
+ message += _("Sending Failed due to missing email information for employee(s): {1}").format(
+ ", ".join(email_failure)
)
frappe.msgprint(message, title=_("Exit Questionnaire"), indicator="blue", is_minimizable=True, wide=True)
diff --git a/hrms/hr/doctype/expense_claim/expense_claim.py b/hrms/hr/doctype/expense_claim/expense_claim.py
index ea54516951..249456cf61 100644
--- a/hrms/hr/doctype/expense_claim/expense_claim.py
+++ b/hrms/hr/doctype/expense_claim/expense_claim.py
@@ -261,7 +261,7 @@ def validate_account_details(self):
if not data.cost_center:
frappe.throw(
_("Row {0}: {1} is required in the expenses table to book an expense claim.").format(
- data.idx, frappe.bold("Cost Center")
+ data.idx, frappe.bold(_("Cost Center"))
)
)
@@ -471,7 +471,8 @@ def get_expense_claim_account(expense_claim_type, company):
if not account:
frappe.throw(
_("Set the default account for the {0} {1}").format(
- frappe.bold("Expense Claim Type"), get_link_to_form("Expense Claim Type", expense_claim_type)
+ frappe.bold(_("Expense Claim Type")),
+ get_link_to_form("Expense Claim Type", expense_claim_type),
)
)
diff --git a/hrms/hr/doctype/interview_feedback/interview_feedback.py b/hrms/hr/doctype/interview_feedback/interview_feedback.py
index ed80f9a5c8..9fec86bd74 100644
--- a/hrms/hr/doctype/interview_feedback/interview_feedback.py
+++ b/hrms/hr/doctype/interview_feedback/interview_feedback.py
@@ -36,8 +36,8 @@ def validate_interview_date(self):
if getdate() < getdate(scheduled_date) and self.docstatus == 1:
frappe.throw(
- _("{0} submission before {1} is not allowed").format(
- frappe.bold("Interview Feedback"), frappe.bold("Interview Scheduled Date")
+ _("Submission of {0} before {1} is not allowed").format(
+ frappe.bold(_("Interview Feedback")), frappe.bold(_("Interview Scheduled Date"))
)
)
diff --git a/hrms/hr/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py b/hrms/hr/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py
index bc140ae351..981441121c 100644
--- a/hrms/hr/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py
+++ b/hrms/hr/report/employee_hours_utilization_based_on_timesheet/employee_hours_utilization_based_on_timesheet.py
@@ -32,10 +32,8 @@ def validate_dates(self):
def validate_standard_working_hours(self):
self.standard_working_hours = frappe.db.get_single_value("HR Settings", "standard_working_hours")
if not self.standard_working_hours:
- msg = _(
- "The metrics for this report are calculated based on the Standard Working Hours. Please set {0} in {1}."
- ).format(
- frappe.bold("Standard Working Hours"),
+ msg = _("The metrics for this report are calculated based on {0}. Please set {0} in {1}.").format(
+ frappe.bold(_("Standard Working Hours")),
frappe.utils.get_link_to_form("HR Settings", "HR Settings"),
)
diff --git a/hrms/hr/report/project_profitability/project_profitability.py b/hrms/hr/report/project_profitability/project_profitability.py
index c524f0941b..699541cc16 100644
--- a/hrms/hr/report/project_profitability/project_profitability.py
+++ b/hrms/hr/report/project_profitability/project_profitability.py
@@ -98,10 +98,8 @@ def get_standard_working_hours() -> float | None:
standard_working_hours = frappe.db.get_single_value("HR Settings", "standard_working_hours")
if not standard_working_hours:
frappe.throw(
- _(
- "The metrics for this report are calculated based on the Standard Working Hours. Please set {0} in {1}."
- ).format(
- frappe.bold("Standard Working Hours"),
+ _("The metrics for this report are calculated based on the {0}. Please set {0} in {1}.").format(
+ frappe.bold(_("Standard Working Hours")),
frappe.utils.get_link_to_form("HR Settings", "HR Settings"),
)
)
diff --git a/hrms/hr/utils.py b/hrms/hr/utils.py
index d48515f4c3..7dd9fb3886 100644
--- a/hrms/hr/utils.py
+++ b/hrms/hr/utils.py
@@ -660,9 +660,7 @@ def share_doc_with_approver(doc, user):
doc.doctype, doc.name, user, submit=1, flags={"ignore_share_permission": True}
)
- frappe.msgprint(
- _("Shared with the user {0} with {1} access").format(user, frappe.bold("submit"), alert=True)
- )
+ frappe.msgprint(_("Shared with the user {0} with 'submit' permisions").format(user, alert=True))
# remove shared doc if approver changes
doc_before_save = doc.get_doc_before_save()
diff --git a/hrms/overrides/company.py b/hrms/overrides/company.py
index e5547dce65..c9fe4d6397 100644
--- a/hrms/overrides/company.py
+++ b/hrms/overrides/company.py
@@ -129,6 +129,6 @@ def validate_default_accounts(doc, method=None):
if get_account_currency(doc.default_payroll_payable_account) != doc.default_currency:
frappe.throw(
_(
- "{0} currency must be same as company's default currency. Please select another account."
- ).format(frappe.bold("Default Payroll Payable Account"))
+ "The currency of {0} should be same as the company's default currency. Please select another account."
+ ).format(frappe.bold(_("Default Payroll Payable Account")))
)
diff --git a/hrms/patches/v15_0/notify_about_loan_app_separation.py b/hrms/patches/v15_0/notify_about_loan_app_separation.py
index f6e1ae4c8e..825c9fcbdf 100644
--- a/hrms/patches/v15_0/notify_about_loan_app_separation.py
+++ b/hrms/patches/v15_0/notify_about_loan_app_separation.py
@@ -16,7 +16,7 @@ def notify_existing_users():
subject = _("WARNING: Loan Management module has been separated from ERPNext.") + "
"
subject += _(
"If you are using loans in salary slips, please install the {0} app from Frappe Cloud Marketplace or GitHub to continue using loan integration with payroll."
- ).format(frappe.bold("Lending"))
+ ).format(frappe.bold(_("Lending")))
notification = {
"subject": subject,
diff --git a/hrms/payroll/doctype/additional_salary/additional_salary.py b/hrms/payroll/doctype/additional_salary/additional_salary.py
index 859011c653..c7ca270b75 100644
--- a/hrms/payroll/doctype/additional_salary/additional_salary.py
+++ b/hrms/payroll/doctype/additional_salary/additional_salary.py
@@ -110,7 +110,7 @@ def validate_employee_referral(self):
frappe.throw(
_(
"Additional Salary for referral bonus can only be created against Employee Referral with status {0}"
- ).format(frappe.bold("Accepted"))
+ ).format(frappe.bold(_("Accepted")))
)
def validate_duplicate_additional_salary(self):
diff --git a/hrms/payroll/doctype/salary_structure/salary_structure.py b/hrms/payroll/doctype/salary_structure/salary_structure.py
index 7fc0ce0f5a..be273466de 100644
--- a/hrms/payroll/doctype/salary_structure/salary_structure.py
+++ b/hrms/payroll/doctype/salary_structure/salary_structure.py
@@ -99,12 +99,12 @@ def validate_payment_days_based_dependent_component(self):
message = _("Row #{0}: The {1} Component has the options {2} and {3} enabled.").format(
row.idx,
frappe.bold(row.salary_component),
- frappe.bold("Amount based on formula"),
- frappe.bold("Depends On Payment Days"),
+ frappe.bold(_("Amount based on formula")),
+ frappe.bold(_("Depends On Payment Days")),
)
message += "
" + _(
"Disable {0} for the {1} component, to prevent the amount from being deducted twice, as its formula already uses a payment-days-based component."
- ).format(frappe.bold("Depends On Payment Days"), frappe.bold(row.salary_component))
+ ).format(frappe.bold(_("Depends On Payment Days")), frappe.bold(row.salary_component))
frappe.throw(message, title=_("Payment Days Dependency"))
def get_component_abbreviations(self):