Skip to content

Commit

Permalink
Add translation strings
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSheps committed Oct 4, 2024
1 parent 0acf0e6 commit dba958d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
25 changes: 13 additions & 12 deletions netbox_lifecycle/tables/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class VendorTable(NetBoxTable):
name = tables.Column(
linkify=True,
verbose_name='Name'
verbose_name=_('Name')
)

class Meta(NetBoxTable.Meta):
Expand Down Expand Up @@ -44,7 +44,7 @@ class Meta(NetBoxTable.Meta):
class SupportContractTable(NetBoxTable):
contract_id = tables.Column(
linkify=True,
verbose_name='Contract ID'
verbose_name=_('Contract ID')
)

class Meta(NetBoxTable.Meta):
Expand All @@ -59,51 +59,52 @@ class Meta(NetBoxTable.Meta):

class SupportContractAssignmentTable(NetBoxTable):
contract = tables.Column(
linkify=True
verbose_name=_('Contract'),
linkify=True,
)
sku = tables.Column(
verbose_name='SKU',
verbose_name=_('SKU'),
linkify=True,
)
device_name = tables.Column(
verbose_name='Device Name',
verbose_name=_('Device Name'),
accessor='device__name',
linkify=False,
orderable=True,
)
device_serial = tables.Column(
verbose_name='Serial Number',
verbose_name=_('Serial Number'),
accessor='device__serial',
orderable=True,
)
device_model = tables.Column(
verbose_name='Device Model',
verbose_name=_('Device Model'),
accessor='device__device_type__model',
linkify=False,
orderable=True,
)
device_status = ChoiceFieldColumn(
verbose_name='Device Status',
verbose_name=_('Device Status'),
accessor='device__status',
orderable=True,
)
license_name = tables.Column(
verbose_name='License',
verbose_name=_('License'),
accessor='license__license__name',
linkify=False,
orderable=True,
)
quantity = tables.Column(
verbose_name='License Quantity',
verbose_name=_('License Quantity'),
accessor='license__quantity',
orderable=False,
)
renewal = tables.Column(
verbose_name='Renewal Date',
verbose_name=_('Renewal Date'),
accessor='contract__renewal',
)
end = tables.Column(
verbose_name='End Date',
verbose_name=_('End Date'),
accessor='end_date',
orderable=False,
)
Expand Down
7 changes: 6 additions & 1 deletion netbox_lifecycle/tables/license.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.utils.translation import gettext as _
import django_tables2 as tables

from netbox.tables import NetBoxTable
Expand All @@ -12,10 +13,11 @@

class LicenseTable(NetBoxTable):
name = tables.Column(
verbose_name=_('Name'),
linkify=True,
verbose_name='Name'
)
manufacturer = tables.Column(
verbose_name=_('Manufacturer'),
linkify=True
)

Expand All @@ -31,12 +33,15 @@ class Meta(NetBoxTable.Meta):

class LicenseAssignmentTable(NetBoxTable):
license = tables.Column(
verbose_name=_('License'),
linkify=True
)
vendor = tables.Column(
verbose_name=_('Vendor'),
linkify=True
)
device = tables.Column(
verbose_name=_('Device'),
linkify=True
)

Expand Down

0 comments on commit dba958d

Please sign in to comment.