mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-26 13:25:20 +00:00
fix: use dummy translations for custom field labels (#49875)
(cherry picked from commit 9a989a84fb)
# Conflicts:
# erpnext/setup/install.py
# erpnext/setup/setup_wizard/operations/install_fixtures.py
This commit is contained in:
@@ -234,3 +234,15 @@ def welcome_email():
|
||||
site_name = get_default_company() or "ERPNext"
|
||||
title = _("Welcome to {0}").format(site_name)
|
||||
return title
|
||||
|
||||
|
||||
def identity(x, *args, **kwargs):
|
||||
"""Used for redefining the translation function to return the string as is.
|
||||
|
||||
We want to create english records but still mark the strings as translatable.
|
||||
E.g. when the respective DocTypes have 'Translate Link Fields' enabled or
|
||||
we're creating custom fields.
|
||||
|
||||
Use like this: `from erpnext.setup.utils import identity as _`
|
||||
"""
|
||||
return x
|
||||
|
||||
Reference in New Issue
Block a user