Cannot translate messages in network_qos edit-rule form

Bug #2037278 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Low
Akihiro Motoki

Bug Description

There are strings which cannot be translated in network_qos edit-rule form.

It is because strings passed to gettext() contains variables. Such variables are evaluated as empty when generating the POT file. For example, a string in [1] will be "Bandwidth Limit - , , , " in the djangojs POT file.

On the other hand, when displaying the form these variables are evaluated and the corresponding string in PO file cannot be found.

edit-rule.controller.js contains the similar strings as [1].

When we need to pass variables to a translatable string, we should use interpolate() as we do in many files.

[1] https://opendev.org/openstack/horizon/src/branch/master/openstack_dashboard/static/app/core/network_qos/actions/edit-rule.controller.js#L42-L43

Tags: i18n
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → Triaged
importance: Undecided → Low
Akihiro Motoki (amotoki)
tags: added: i18n
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/horizon/+/896978

Changed in horizon:
status: Triaged → In Progress
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.