mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-23 21:57:47 -06:00
15094 Add missing gettext to error strings for internationalization (#15155)
* 15049 add missing gettext to error strings * 15049 add missing gettext to error strings * 15094 review change * 15094 review change * Formatting cleanup --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from netbox.registry import registry
|
||||
from netbox.search.backends import search_backend
|
||||
@@ -62,7 +63,7 @@ class Command(BaseCommand):
|
||||
# Determine which models to reindex
|
||||
indexers = self._get_indexers(*model_labels)
|
||||
if not indexers:
|
||||
raise CommandError("No indexers found!")
|
||||
raise CommandError(_("No indexers found!"))
|
||||
self.stdout.write(f'Reindexing {len(indexers)} models.')
|
||||
|
||||
# Clear all cached values for the specified models (if not being lazy)
|
||||
|
||||
Reference in New Issue
Block a user