Merge "made router status value translatable"
This commit is contained in:
commit
c7123d3f57
@ -16,6 +16,7 @@ import logging
|
||||
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.template import defaultfilters as filters
|
||||
from django.utils.translation import pgettext_lazy
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext_lazy
|
||||
from neutronclient.common import exceptions as q_ext
|
||||
@ -192,13 +193,18 @@ class RoutersFilterAction(tables.FilterAction):
|
||||
|
||||
|
||||
class RoutersTable(tables.DataTable):
|
||||
STATUS_DISPLAY_CHOICES = (
|
||||
("active", pgettext_lazy("current status of router", u"Active")),
|
||||
("error", pgettext_lazy("current status of router", u"Error")),
|
||||
)
|
||||
|
||||
name = tables.Column("name",
|
||||
verbose_name=_("Name"),
|
||||
link="horizon:project:routers:detail")
|
||||
status = tables.Column("status",
|
||||
filters=(filters.title,),
|
||||
verbose_name=_("Status"),
|
||||
status=True)
|
||||
status=True,
|
||||
display_choices=STATUS_DISPLAY_CHOICES)
|
||||
distributed = tables.Column("distributed",
|
||||
filters=(filters.yesno, filters.capfirst),
|
||||
verbose_name=_("Distributed"))
|
||||
|
Loading…
Reference in New Issue
Block a user