mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #13149: Wrap form field labels with gettext_lazy()
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import re
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from utilities.forms.constants import *
|
||||
from utilities.forms.utils import expand_alphanumeric_pattern, expand_ipaddress_pattern
|
||||
@ -21,10 +21,10 @@ class ExpandableNameField(forms.CharField):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
if not self.help_text:
|
||||
self.help_text = """
|
||||
Alphanumeric ranges are supported for bulk creation. Mixed cases and types within a single range
|
||||
are not supported (example: <code>[ge,xe]-0/0/[0-9]</code>).
|
||||
"""
|
||||
self.help_text = _(
|
||||
"Alphanumeric ranges are supported for bulk creation. Mixed cases and types within a single range are "
|
||||
"not supported (example: <code>[ge,xe]-0/0/[0-9]</code>)."
|
||||
)
|
||||
|
||||
def to_python(self, value):
|
||||
if not value:
|
||||
|
Reference in New Issue
Block a user