瀏覽代碼

Closes #15752: Remove the ENABLE_LOCALIZATION configuration parameter

Jeremy Stretch 2 年之前
父節點
當前提交
95cc29d898
共有 3 個文件被更改,包括 0 次插入16 次删除
  1. 0 8
      docs/configuration/system.md
  2. 0 3
      netbox/netbox/configuration_example.py
  3. 0 5
      netbox/netbox/settings.py

+ 0 - 8
docs/configuration/system.md

@@ -65,14 +65,6 @@ Email is sent from NetBox only for critical events or if configured for [logging
 
 ---
 
-## ENABLE_LOCALIZATION
-
-Default: False
-
-Determines if localization features are enabled or not. This should only be enabled for development or testing purposes as netbox is not yet fully localized. Turning this on will localize numeric and date formats based on the browser locale as well as translate certain strings from third party modules.
-
----
-
 ## HTTP_PROXIES
 
 Default: None

+ 0 - 3
netbox/netbox/configuration_example.py

@@ -131,9 +131,6 @@ EMAIL = {
     'FROM_EMAIL': '',
 }
 
-# Localization
-ENABLE_LOCALIZATION = False
-
 # Exempt certain models from the enforcement of view permissions. Models listed here will be viewable by all users and
 # by anonymous users. List models in the form `<app>.<model>`. Add '*' to this list to exempt all models.
 EXEMPT_VIEW_PERMISSIONS = [

+ 0 - 5
netbox/netbox/settings.py

@@ -91,7 +91,6 @@ DEVELOPER = getattr(configuration, 'DEVELOPER', 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'))
 EMAIL = getattr(configuration, 'EMAIL', {})
-ENABLE_LOCALIZATION = getattr(configuration, 'ENABLE_LOCALIZATION', False)
 EVENTS_PIPELINE = getattr(configuration, 'EVENTS_PIPELINE', (
     'extras.events.process_event_queue',
 ))
@@ -385,8 +384,6 @@ MIDDLEWARE = [
     'netbox.middleware.MaintenanceModeMiddleware',
     'django_prometheus.middleware.PrometheusAfterMiddleware',
 ]
-if not ENABLE_LOCALIZATION:
-    MIDDLEWARE.remove('django.middleware.locale.LocaleMiddleware')
 
 # URLs
 ROOT_URLCONF = 'netbox.urls'
@@ -711,8 +708,6 @@ LANGUAGES = (
 LOCALE_PATHS = (
     BASE_DIR + '/translations',
 )
-if not ENABLE_LOCALIZATION:
-    USE_I18N = False
 
 #
 # Strawberry (GraphQL)