Localized string does not render on generated cell links

Bug #1236611 reported by Lin Hua Cheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Lin Hua Cheng

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.

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/50216

Changed in horizon:
status: New → In Progress
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/50216
Committed: http://github.com/openstack/horizon/commit/a10f57b203fc50e46a230a22c37c7cd492f08e13
Submitter: Jenkins
Branch: master

commit a10f57b203fc50e46a230a22c37c7cd492f08e13
Author: Lin Hua Cheng <email address hidden>
Date: Mon Oct 7 20:40:46 2013 -0700

    Fix rendering of Localized string on cell links

    Change-Id: I0de0f5acb34976b7e17282ce4957625f01097b5d
    Closes-bug: 1236611

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
importance: Undecided → Low
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.