mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 16:48:16 -06:00
Was added to searching support languages other than English for object types(s).
This commit is contained in:
parent
00d9a865c0
commit
2388354936
@ -8,6 +8,7 @@ from django.db.models.fields.related import ForeignKey
|
||||
from django.db.models.functions import window
|
||||
from django.db.models.signals import post_delete, post_save
|
||||
from django.utils.module_loading import import_string
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
import netaddr
|
||||
from netaddr.core import AddrFormatError
|
||||
|
||||
@ -39,7 +40,7 @@ class SearchBackend:
|
||||
# Organize choices by category
|
||||
categories = defaultdict(dict)
|
||||
for label, idx in registry['search'].items():
|
||||
categories[idx.get_category()][label] = title(idx.model._meta.verbose_name)
|
||||
categories[idx.get_category()][label] = _(title(idx.model._meta.verbose_name))
|
||||
|
||||
# Compile a nested tuple of choices for form rendering
|
||||
results = (
|
||||
|
Loading…
Reference in New Issue
Block a user