Mouseover help for user settings items per page is not translatable

Bug #1563021 reported by Doug Fish
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Neutron LBaaS Dashboard
Invalid
Undecided
Unassigned
OpenStack Dashboard (Horizon)
Fix Released
High
Kenji Ishii

Bug Description

When Editing user settings [username]->Settings the help mouseover value "Number of items to show per page (..." is not shown as translated.

This failure can be seen in the Pseudo translation tool if it's patched with https://review.openstack.org/#/c/298379/

and can also be seen in Japanese. Note that the segment is translated, but not displayed in Horizon:
https://github.com/openstack/horizon/blob/stable/mitaka/openstack_dashboard/locale/ja/LC_MESSAGES/django.po#L5832
and
https://github.com/openstack/horizon/blob/master/openstack_dashboard/locale/ja/LC_MESSAGES/django.po#L5835

Tags: i18n
Doug Fish (drfish)
Changed in neutron-lbaas-dashboard:
status: New → Invalid
Changed in horizon:
assignee: nobody → ryota mizutani (ry-mizutani)
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/298584

Changed in horizon:
status: New → In Progress
Changed in horizon:
importance: Undecided → High
tags: added: i18n
Changed in horizon:
milestone: none → newton-1
Changed in horizon:
status: In Progress → Confirmed
Changed in horizon:
assignee: ryota mizutani (ry-mizutani) → nobody
Changed in horizon:
assignee: nobody → Marcellin Fom Tchassem (mf6510)
Revision history for this message
Doug Fish (drfish) wrote :

I've observed that the translation seems to work correctly if the string formatting is not used (that is, if the %s and related % max_value are removed)

My concern is this line in Django
https://github.com/django/django/blob/53ccffdb8c8e47a4d4304df453d8c79a9be295ab/django/forms/forms.py#L211

My unconfirmed suspicion is that force_text is causing an early resolution of the string when the class is first defined, rather than keeping the lazy translation object and parameters so the proper string can be computed at a later time.

Changed in horizon:
assignee: Marcellin Fom Tchassem (mf6510) → nobody
Kenji Ishii (ken-ishii)
Changed in horizon:
assignee: nobody → Kenji Ishii (ken-ishii)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
mukund (mukund-gandlur) wrote :

I find the translation happening. What exactly is the bug?
Can somebody paste a screeshot if possible?

Revision history for this message
Kenji Ishii (ken-ishii) wrote :

The upper side is this issue.
The lower side is no problem. The help message of the number of page size only have a issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/308839
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7b43577172c79bc9466984dca436a1e0ae70dc88
Submitter: Jenkins
Branch: master

commit 7b43577172c79bc9466984dca436a1e0ae70dc88
Author: Kenji Ishii <email address hidden>
Date: Thu Apr 21 07:55:43 2016 +0000

    Fix the issue help_text is not translated in User Setting

    help message at the field of number of page size is not tranlated.
    When we define any form field, it seems that translation does not
    work well if help_text has any variable.
    This patch will fix it.

    Change-Id: I106e00c0fdc073999f879ffa032e11fde7735953
    Closes-Bug: #1563021

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/298584
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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.