mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 14:22:16 -06:00
add ENABLE_TRANSLATION setting to optionally turn translation off (#16096)
* add USE_I18N setting * change setting name to ENABLE_TRANSLATION * raise a warning in the UI when translation is disabled * Misc cleanup * Rename to TRANSLATION_ENABLED for consistency with other settings --------- Co-authored-by: Anton Myasnikov <anton.myasnikov@nordigy.ru> Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -40,11 +40,8 @@ class UserConfigFormMetaclass(forms.models.ModelFormMetaclass):
|
||||
help_text = f'<code>{field_name}</code>'
|
||||
if preference.description:
|
||||
help_text = f'{preference.description}<br />{help_text}'
|
||||
if preference.experimental:
|
||||
help_text = (
|
||||
f'<span class="text-danger"><i class="mdi mdi-alert"></i> Experimental feature</span><br />'
|
||||
f'{help_text}'
|
||||
)
|
||||
if warning := preference.warning:
|
||||
help_text = f'<span class="text-danger"><i class="mdi mdi-alert"></i> {warning}</span><br />{help_text}'
|
||||
field_kwargs = {
|
||||
'label': preference.label,
|
||||
'choices': preference.choices,
|
||||
|
||||
Reference in New Issue
Block a user