8000 fix: remove redundant translation by barredterra · Pull Request #18775 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: remove redundant translation #18775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions frappe/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,6 @@ def get_js(items):
with open(contentpath) as srcfile:
code = frappe.utils.cstr(srcfile.read())

if frappe.local.lang != "en":
messages = frappe.get_lang_dict("jsfile", contentpath)
messages = json.dumps(messages)
code += f"\n\n$.extend(frappe._messages, {messages})"

out.append(code)

return out
Expand Down
2 changes: 0 additions & 2 deletions frappe/core/page/permission_manager/permission_manager.py
10000
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
setup_custom_perms,
update_permission_property,
)
from frappe.translate import send_translations
from frappe.utils.user import get_users_with_role as _get_user_with_role

not_allowed_in_permission_manager = ["DocType", "Patch Log", "Module Def", "Transaction Log"]
Expand All @@ -28,7 +27,6 @@
@frappe.whitelist()
def get_roles_and_doctypes():
frappe.only_for("System Manager")
send_translations(frappe.get_lang_dict("doctype", "DocPerm"))

active_domains = frappe.get_active_domains()

Expand Down
5 changes: 0 additions & 5 deletions frappe/desk/desk_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# License: MIT. See LICENSE

import frappe
from frappe.translate import send_translations


@frappe.whitelist()
Expand Down Expand Up @@ -31,10 +30,6 @@ def getpage():
page = frappe.form_dict.get("name")
doc = get(page)

# load translations
if frappe.lang != "en":
send_translations(frappe.get_lang_dict("page", page))

frappe.response.docs.append(doc)


Expand Down
5 changes: 0 additions & 5 deletions frappe/desk/query_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from frappe.modules import get_module_path, scrub
from frappe.monitor import add_data_to_monitor
from frappe.permissions import get_role_permissions
from frappe.translate import send_translations
from frappe.utils import (
cint,
cstr,
Expand Down Expand Up @@ -202,10 +201,6 @@ def get_script(report_name):
if not script:
script = "frappe.query_reports['%s']={}" % report_name

# load translations
if frappe.lang != "en":
send_translations(frappe.get_lang_dict("report", report_name))

return {
"script": render_include(script),
"html_format": html_format,
Expand Down
0