From 429d046c6c924f14793b24cbde92a2d4b703907f Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 14 May 2024 09:02:41 -0400 Subject: [PATCH] Misc cleanup --- docs/configuration/system.md | 3 +-- netbox/netbox/preferences.py | 4 ++-- netbox/netbox/settings.py | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration/system.md b/docs/configuration/system.md index 2f128e079..9df22165c 100644 --- a/docs/configuration/system.md +++ b/docs/configuration/system.md @@ -66,8 +66,7 @@ Email is sent from NetBox only for critical events or if configured for [logging Default: True -Provides a way to turn translation system off and make NetBox English-based for all users. Directly maps to [USE_I18N](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_I18N) Django setting. - +Enables language translation for the user interface. (This parameter maps to Django's [USE_I18N](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_I18N) setting.) --- diff --git a/netbox/netbox/preferences.py b/netbox/netbox/preferences.py index 4978df40c..2d82af974 100644 --- a/netbox/netbox/preferences.py +++ b/netbox/netbox/preferences.py @@ -31,9 +31,9 @@ PREFERENCES = { ('', _('Auto')), *settings.LANGUAGES, ), - description=_('Forces UI translation to the specified language.'), + description=_('Forces UI translation to the specified language'), warning=( - f"Translation is globally disabled inside configuration.py" + _("Support for translation has been disabled locally") if not settings.ENABLE_TRANSLATION else '' ) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 3a3448105..2dc4a36e1 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -446,6 +446,7 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}' # Use timezone-aware datetime objects USE_TZ = True +# Toggle language translation support USE_I18N = ENABLE_TRANSLATION # WSGI