From a1880547c5b09a79c283091e3c77a4800a7c95bc Mon Sep 17 00:00:00 2001 From: Masco Kaliyamoorthy Date: Fri, 13 Mar 2015 17:14:51 +0530 Subject: [PATCH] made network status value translatable value of status column is not translatable in network table in this patch, added the display choices with translatable option Change-Id: Ide70ca5639d0af697856f79900b01bcf6cc84165 Closes-Bug: #1431825 --- openstack_dashboard/dashboards/project/networks/tables.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/dashboards/project/networks/tables.py b/openstack_dashboard/dashboards/project/networks/tables.py index 14cdbe9eac..e13e3c4524 100644 --- a/openstack_dashboard/dashboards/project/networks/tables.py +++ b/openstack_dashboard/dashboards/project/networks/tables.py @@ -146,6 +146,12 @@ DISPLAY_CHOICES = ( ("UP", pgettext_lazy("Admin state of a Network", u"UP")), ("DOWN", pgettext_lazy("Admin state of a Network", u"DOWN")), ) +STATUS_DISPLAY_CHOICES = ( + ("ACTIVE", pgettext_lazy("Current status of a Network", u"Active")), + ("BUILD", pgettext_lazy("Current status of a Network", u"Build")), + ("DOWN", pgettext_lazy("Current status of a Network", u"Down")), + ("ERROR", pgettext_lazy("Current status of a Network", u"Error")), +) class NetworksFilterAction(tables.FilterAction): @@ -166,7 +172,7 @@ class NetworksTable(tables.DataTable): shared = tables.Column("shared", verbose_name=_("Shared"), filters=(filters.yesno, filters.capfirst)) status = tables.Column("status", verbose_name=_("Status"), - filters=(filters.title,)) + display_choices=STATUS_DISPLAY_CHOICES) admin_state = tables.Column("admin_state", verbose_name=_("Admin State"), display_choices=DISPLAY_CHOICES)