Django template default values are not translatable

Bug #1138183 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

Default value defined in django template are not marked as translatable.

Example:
    {{ router.name|default:"None" }}

Akihiro Motoki:
I grepped *.html in the code base of Horizon by "default:" and I found all of default value are not translatable. This should be fixed with other default value in a separate patch I think.

One alternative to fix this is to use this syntax:

Should probably look like:
    {{ router.name|default:_("None") }}

Thoughts?

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
summary: - Django template default values are not translated
+ Django template default values are not translatable
Changed in horizon:
status: New → Confirmed
Changed in horizon:
importance: Undecided → Low
milestone: none → havana-1
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/25068

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

Reviewed: https://review.openstack.org/25068
Committed: http://github.com/openstack/horizon/commit/7b2082a2e446d5e36a5ad2915da68d4855bf4459
Submitter: Jenkins
Branch: master

commit 7b2082a2e446d5e36a5ad2915da68d4855bf4459
Author: Lin Hua Cheng <email address hidden>
Date: Thu Mar 21 15:46:35 2013 -0700

    Made default values in templates translatable.

    Fixes bug 1138183

    Change-Id: I4a5d1f89e94b547bb0850020cb3fd4c03ec30179

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-1 → 2013.2
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.