Skip to content

Commit

Permalink
fix(Leave Type): translatability of tour step (backport #1371) (#1372)
Browse files Browse the repository at this point in the history
* fix(Leave Type): translatability of tour step

* fix(Leave Applications): make role and settings translatable

* chore: fix tour messages

---------

Co-authored-by: Rucha Mahabal <[email protected]>
(cherry picked from commit febb7d9)

Co-authored-by: Raffael Meyer <[email protected]>
  • Loading branch information
mergify[bot] and barredterra authored Feb 2, 2024
1 parent fe38ef2 commit f2d9039
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hrms/hr/doctype/leave_application/leave_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ def validate_dates(self):
if not allowed_role:
frappe.throw(
_("Backdated Leave Application is restricted. Please set the {} in {}").format(
frappe.bold("Role Allowed to Create Backdated Leave Application"),
get_link_to_form("HR Settings", "HR Settings"),
frappe.bold(_("Role Allowed to Create Backdated Leave Application")),
get_link_to_form("HR Settings", "HR Settings", _("HR Settings")),
)
)

if allowed_role and allowed_role not in user_roles:
frappe.throw(
_("Only users with the {0} role can create backdated leave applications").format(
allowed_role
_(allowed_role)
)
)

Expand Down
7 changes: 6 additions & 1 deletion hrms/hr/doctype/leave_type/leave_type.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ frappe.tour["Leave Type"] = [
{
fieldname: "is_compensatory",
title: "Is Compensatory Leave",
description: __("Leaves you can avail against a holiday you worked on. You can claim Compensatory Off Leave using Compensatory Leave request. Click") + " <a href='https://docs.erpnext.com/docs/v13/user/manual/en/human-resources/compensatory-leave-request' target='_blank'>here</a> " + __('to know more')
description: __(
"Leaves you can avail against a holiday you worked on. You can claim Compensatory Off Leave using Compensatory Leave Request. Click {0} to know more",
[
`<a href='https://frappehr.com/docs/v14/en/compensatory-leave-request' target='_blank'>${__("here")}</a>`
]
)
},
{
fieldname: "allow_encashment",
Expand Down

0 comments on commit f2d9039

Please sign in to comment.