refactor: add type hints to get_boot_translations
This commit is contained in:
parent
9ef5aa256b
commit
a574651acc
1 changed files with 1 additions and 1 deletions
|
|
@ -133,7 +133,7 @@ def get_messages_for_boot():
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist(allow_guest=True, methods=["GET"])
|
@frappe.whitelist(allow_guest=True, methods=["GET"])
|
||||||
def get_boot_translations(lang=None):
|
def get_boot_translations(lang: str | None = None) -> dict[str, str]:
|
||||||
"""Return all translations for the current user's language."""
|
"""Return all translations for the current user's language."""
|
||||||
frappe.local.response_headers["Cache-Control"] = "private, max-age=31536000"
|
frappe.local.response_headers["Cache-Control"] = "private, max-age=31536000"
|
||||||
return get_all_translations(lang or frappe.local.lang)
|
return get_all_translations(lang or frappe.local.lang)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue