yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #92851
[Bug 2037278] [NEW] Cannot translate messages in network_qos edit-rule form
Public bug reported:
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
** Affects: horizon
Importance: Low
Assignee: Akihiro Motoki (amotoki)
Status: Triaged
** Changed in: horizon
Assignee: (unassigned) => Akihiro Motoki (amotoki)
** Changed in: horizon
Status: New => Triaged
** Changed in: horizon
Importance: Undecided => Low
--
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/2037278
Title:
Cannot translate messages in network_qos edit-rule form
Status in OpenStack Dashboard (Horizon):
Triaged
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/2037278/+subscriptions
Follow ups