Skip to content

Commit

Permalink
fix: .format instead of f strings for translations
Browse files Browse the repository at this point in the history
(cherry picked from commit 69eac61)
  • Loading branch information
krantheman authored and mergify[bot] committed Dec 12, 2023
1 parent 48fcac0 commit aa21c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hrms/hr/doctype/job_opening/job_opening.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ def validate_past_future(self, field, is_past):
today = getdate()
if is_past:
if getdate(date) > today:
frappe.throw(_(f"{frappe.bold(label)} cannot be a future date"))
frappe.throw(_("{} cannot be a future date").format(frappe.bold(label)))
else:
if getdate(date) < today:
frappe.throw(_(f"{frappe.bold(label)} cannot be a past date"))
frappe.throw(_("{} cannot be a past date").format(frappe.bold(label)))

def validate_current_vacancies(self):
if not self.staffing_plan:
Expand Down
4 changes: 3 additions & 1 deletion hrms/www/jobs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ <h3 class="mt-0 mb-10">{{ _("Job Openings") }}</h3>
</div>
</div>
</div>
<p class="text-secondary mb-4 md-text">Showing {{ job_openings|length }} results</p>
<p class="text-secondary mb-4 md-text">
Showing {{ job_openings|length }} {{ "result" if job_openings|length == 1 else "results" }}
</p>
{% for jo in job_openings %}
<div class="mb-8 card border p-6">
<div class="flex">
Expand Down

0 comments on commit aa21c5e

Please sign in to comment.