Misc cleanup

This commit is contained in:
Jeremy Stretch 2024-05-14 09:02:41 -04:00
parent c519817054
commit 429d046c6c
3 changed files with 4 additions and 4 deletions

View File

@ -66,8 +66,7 @@ Email is sent from NetBox only for critical events or if configured for [logging
Default: True 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.)
--- ---

View File

@ -31,9 +31,9 @@ PREFERENCES = {
('', _('Auto')), ('', _('Auto')),
*settings.LANGUAGES, *settings.LANGUAGES,
), ),
description=_('Forces UI translation to the specified language.'), description=_('Forces UI translation to the specified language'),
warning=( warning=(
f"Translation is globally disabled inside configuration.py" _("Support for translation has been disabled locally")
if not settings.ENABLE_TRANSLATION if not settings.ENABLE_TRANSLATION
else '' else ''
) )

View File

@ -446,6 +446,7 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
# Use timezone-aware datetime objects # Use timezone-aware datetime objects
USE_TZ = True USE_TZ = True
# Toggle language translation support
USE_I18N = ENABLE_TRANSLATION USE_I18N = ENABLE_TRANSLATION
# WSGI # WSGI