← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1236611] Re: Localized string does not render on generated cell links

 

** Changed in: horizon
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1236611

Title:
  Localized string does not render on generated cell links

Status in OpenStack Dashboard (Horizon):
  Fix Released

Bug description:
  Localized string have a proxy value and does not render on html.

  Example (adding a column "localized_string" that returns a localized
  string) :

  def get_localized_string(datum):
      return _("Localized String")

  class TenantsTable(tables.DataTable):
      name = tables.Column('name', verbose_name=_('Name'))
      description = tables.Column(lambda obj: getattr(obj, 'description', None),
                                  verbose_name=_('Description'))
      id = tables.Column('id', verbose_name=_('Project ID'))
      enabled = tables.Column('enabled', verbose_name=_('Enabled'), status=True)
      localized_string = tables.Column(get_localized_string,
                                       link="horizon:admin:projects:update",
                                       verbose_name=_('Localized'))

  The column localized_string does not render at all.

  A solution would be to enclose the string in unicode() prior to
  displaying.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1236611/+subscriptions