mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
13279 add gettext_lazy to choices
This commit is contained in:
parent
cf1b1a83eb
commit
c45bc1b591
@ -1,3 +1,4 @@
|
|||||||
|
from django.utils.translation import gettext_lazy as _
|
||||||
from utilities.choices import ChoiceSet
|
from utilities.choices import ChoiceSet
|
||||||
|
|
||||||
|
|
||||||
@ -16,12 +17,12 @@ class CircuitStatusChoices(ChoiceSet):
|
|||||||
STATUS_DECOMMISSIONED = 'decommissioned'
|
STATUS_DECOMMISSIONED = 'decommissioned'
|
||||||
|
|
||||||
CHOICES = [
|
CHOICES = [
|
||||||
(STATUS_PLANNED, 'Planned', 'cyan'),
|
(STATUS_PLANNED, _('Planned'), 'cyan'),
|
||||||
(STATUS_PROVISIONING, 'Provisioning', 'blue'),
|
(STATUS_PROVISIONING, _('Provisioning'), 'blue'),
|
||||||
(STATUS_ACTIVE, 'Active', 'green'),
|
(STATUS_ACTIVE, _('Active'), 'green'),
|
||||||
(STATUS_OFFLINE, 'Offline', 'red'),
|
(STATUS_OFFLINE, _('Offline'), 'red'),
|
||||||
(STATUS_DEPROVISIONING, 'Deprovisioning', 'yellow'),
|
(STATUS_DEPROVISIONING, _('Deprovisioning'), 'yellow'),
|
||||||
(STATUS_DECOMMISSIONED, 'Decommissioned', 'gray'),
|
(STATUS_DECOMMISSIONED, _('Decommissioned'), 'gray'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -29,15 +30,15 @@ class CircuitCommitRateChoices(ChoiceSet):
|
|||||||
key = 'Circuit.commit_rate'
|
key = 'Circuit.commit_rate'
|
||||||
|
|
||||||
CHOICES = [
|
CHOICES = [
|
||||||
(10000, '10 Mbps'),
|
(10000, _('10 Mbps')),
|
||||||
(100000, '100 Mbps'),
|
(100000, _('100 Mbps')),
|
||||||
(1000000, '1 Gbps'),
|
(1000000, _('1 Gbps')),
|
||||||
(10000000, '10 Gbps'),
|
(10000000, _('10 Gbps')),
|
||||||
(25000000, '25 Gbps'),
|
(25000000, _('25 Gbps')),
|
||||||
(40000000, '40 Gbps'),
|
(40000000, _('40 Gbps')),
|
||||||
(100000000, '100 Gbps'),
|
(100000000, _('100 Gbps')),
|
||||||
(1544, 'T1 (1.544 Mbps)'),
|
(1544, _('T1 (1.544 Mbps)')),
|
||||||
(2048, 'E1 (2.048 Mbps)'),
|
(2048, _('E1 (2.048 Mbps)')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -51,8 +52,8 @@ class CircuitTerminationSideChoices(ChoiceSet):
|
|||||||
SIDE_Z = 'Z'
|
SIDE_Z = 'Z'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
(SIDE_A, 'A'),
|
(SIDE_A, _('A')),
|
||||||
(SIDE_Z, 'Z')
|
(SIDE_Z, _('Z'))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -60,13 +61,13 @@ class CircuitTerminationPortSpeedChoices(ChoiceSet):
|
|||||||
key = 'CircuitTermination.port_speed'
|
key = 'CircuitTermination.port_speed'
|
||||||
|
|
||||||
CHOICES = [
|
CHOICES = [
|
||||||
(10000, '10 Mbps'),
|
(10000, _('10 Mbps')),
|
||||||
(100000, '100 Mbps'),
|
(100000, _('100 Mbps')),
|
||||||
(1000000, '1 Gbps'),
|
(1000000, _('1 Gbps')),
|
||||||
(10000000, '10 Gbps'),
|
(10000000, _('10 Gbps')),
|
||||||
(25000000, '25 Gbps'),
|
(25000000, _('25 Gbps')),
|
||||||
(40000000, '40 Gbps'),
|
(40000000, _('40 Gbps')),
|
||||||
(100000000, '100 Gbps'),
|
(100000000, _('100 Gbps')),
|
||||||
(1544, 'T1 (1.544 Mbps)'),
|
(1544, _('T1 (1.544 Mbps)')),
|
||||||
(2048, 'E1 (2.048 Mbps)'),
|
(2048, _('E1 (2.048 Mbps)')),
|
||||||
]
|
]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from utilities.choices import ChoiceSet
|
from utilities.choices import ChoiceSet
|
||||||
|
|
||||||
@ -63,12 +63,12 @@ class JobStatusChoices(ChoiceSet):
|
|||||||
STATUS_FAILED = 'failed'
|
STATUS_FAILED = 'failed'
|
||||||
|
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
(STATUS_PENDING, 'Pending', 'cyan'),
|
(STATUS_PENDING, _('Pending'), 'cyan'),
|
||||||
(STATUS_SCHEDULED, 'Scheduled', 'gray'),
|
(STATUS_SCHEDULED, _('Scheduled'), 'gray'),
|
||||||
(STATUS_RUNNING, 'Running', 'blue'),
|
(STATUS_RUNNING, _('Running'), 'blue'),
|
||||||
(STATUS_COMPLETED, 'Completed', 'green'),
|
(STATUS_COMPLETED, _('Completed'), 'green'),
|
||||||
(STATUS_ERRORED, 'Errored', 'red'),
|
(STATUS_ERRORED, _('Errored'), 'red'),
|
||||||
(STATUS_FAILED, 'Failed', 'red'),
|
(STATUS_FAILED, _('Failed'), 'red'),
|
||||||
)
|
)
|
||||||
|
|
||||||
TERMINAL_STATE_CHOICES = (
|
TERMINAL_STATE_CHOICES = (
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user