Merge "made router status value translatable"

This commit is contained in:
Jenkins 2015-02-11 10:33:23 +00:00 committed by Gerrit Code Review
commit c7123d3f57

View File

@ -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"))