Rename to TRANSLATION_ENABLED for consistency with other settings

This commit is contained in:
Jeremy Stretch 2024-05-14 09:06:50 -04:00
parent 429d046c6c
commit b35a1128bd
3 changed files with 11 additions and 11 deletions

View File

@ -62,14 +62,6 @@ Email is sent from NetBox only for critical events or if configured for [logging
--- ---
## ENABLE_TRANSLATION
Default: True
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.)
---
## HTTP_PROXIES ## HTTP_PROXIES
Default: None Default: None
@ -206,3 +198,11 @@ If `STORAGE_BACKEND` is not defined, this setting will be ignored.
Default: UTC Default: UTC
The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
---
## TRANSLATION_ENABLED
Default: True
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

@ -34,7 +34,7 @@ PREFERENCES = {
description=_('Forces UI translation to the specified language'), description=_('Forces UI translation to the specified language'),
warning=( warning=(
_("Support for translation has been disabled locally") _("Support for translation has been disabled locally")
if not settings.ENABLE_TRANSLATION if not settings.TRANSLATION_ENABLED
else '' else ''
) )
), ),

View File

@ -92,7 +92,6 @@ DEVELOPER = getattr(configuration, 'DEVELOPER', False)
DJANGO_ADMIN_ENABLED = getattr(configuration, 'DJANGO_ADMIN_ENABLED', False) DJANGO_ADMIN_ENABLED = getattr(configuration, 'DJANGO_ADMIN_ENABLED', False)
DOCS_ROOT = getattr(configuration, 'DOCS_ROOT', os.path.join(os.path.dirname(BASE_DIR), 'docs')) DOCS_ROOT = getattr(configuration, 'DOCS_ROOT', os.path.join(os.path.dirname(BASE_DIR), 'docs'))
EMAIL = getattr(configuration, 'EMAIL', {}) EMAIL = getattr(configuration, 'EMAIL', {})
ENABLE_TRANSLATION = getattr(configuration, 'ENABLE_TRANSLATION', True)
EVENTS_PIPELINE = getattr(configuration, 'EVENTS_PIPELINE', ( EVENTS_PIPELINE = getattr(configuration, 'EVENTS_PIPELINE', (
'extras.events.process_event_queue', 'extras.events.process_event_queue',
)) ))
@ -157,6 +156,7 @@ SESSION_FILE_PATH = getattr(configuration, 'SESSION_FILE_PATH', None)
STORAGE_BACKEND = getattr(configuration, 'STORAGE_BACKEND', None) STORAGE_BACKEND = getattr(configuration, 'STORAGE_BACKEND', None)
STORAGE_CONFIG = getattr(configuration, 'STORAGE_CONFIG', {}) STORAGE_CONFIG = getattr(configuration, 'STORAGE_CONFIG', {})
TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC') TIME_ZONE = getattr(configuration, 'TIME_ZONE', 'UTC')
TRANSLATION_ENABLED = getattr(configuration, 'TRANSLATION_ENABLED', True)
# Load any dynamic configuration parameters which have been hard-coded in the configuration file # Load any dynamic configuration parameters which have been hard-coded in the configuration file
for param in CONFIG_PARAMS: for param in CONFIG_PARAMS:
@ -447,7 +447,7 @@ LOGIN_REDIRECT_URL = f'/{BASE_PATH}'
USE_TZ = True USE_TZ = True
# Toggle language translation support # Toggle language translation support
USE_I18N = ENABLE_TRANSLATION USE_I18N = TRANSLATION_ENABLED
# WSGI # WSGI
WSGI_APPLICATION = 'netbox.wsgi.application' WSGI_APPLICATION = 'netbox.wsgi.application'