1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Closes #13279: Wrap choice labels with gettext()

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Arthur Hanson
2023-08-01 04:31:07 +07:00
committed by GitHub
parent e284cd7e54
commit e625a5667c
9 changed files with 286 additions and 271 deletions

View File

@@ -1,3 +1,5 @@
from django.utils.translation import gettext_lazy as _
from utilities.choices import ChoiceSet
@@ -15,11 +17,11 @@ class ClusterStatusChoices(ChoiceSet):
STATUS_OFFLINE = 'offline'
CHOICES = [
(STATUS_PLANNED, 'Planned', 'cyan'),
(STATUS_STAGING, 'Staging', 'blue'),
(STATUS_ACTIVE, 'Active', 'green'),
(STATUS_DECOMMISSIONING, 'Decommissioning', 'yellow'),
(STATUS_OFFLINE, 'Offline', 'red'),
(STATUS_PLANNED, _('Planned'), 'cyan'),
(STATUS_STAGING, _('Staging'), 'blue'),
(STATUS_ACTIVE, _('Active'), 'green'),
(STATUS_DECOMMISSIONING, _('Decommissioning'), 'yellow'),
(STATUS_OFFLINE, _('Offline'), 'red'),
]
@@ -38,10 +40,10 @@ class VirtualMachineStatusChoices(ChoiceSet):
STATUS_DECOMMISSIONING = 'decommissioning'
CHOICES = [
(STATUS_OFFLINE, 'Offline', 'gray'),
(STATUS_ACTIVE, 'Active', 'green'),
(STATUS_PLANNED, 'Planned', 'cyan'),
(STATUS_STAGED, 'Staged', 'blue'),
(STATUS_FAILED, 'Failed', 'red'),
(STATUS_DECOMMISSIONING, 'Decommissioning', 'yellow'),
(STATUS_OFFLINE, _('Offline'), 'gray'),
(STATUS_ACTIVE, _('Active'), 'green'),
(STATUS_PLANNED, _('Planned'), 'cyan'),
(STATUS_STAGED, _('Staged'), 'blue'),
(STATUS_FAILED, _('Failed'), 'red'),
(STATUS_DECOMMISSIONING, _('Decommissioning'), 'yellow'),
]