table action message is not translated properly

Bug #1534939 reported by liao_zd@hotmail.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Low
Unassigned

Bug Description

table actions in the success message and info message are not easily translated.

code is: msg = _('%(action)s: %(objs)s')

the whole piece of message is translated, but this way make django.po file hard to make. I want to break the whole piece of message down to more granular level, then each action can be translated easily.

Tags: i18n
Changed in horizon:
status: New → In Progress
assignee: nobody → liao_zd@hotmail.com (liaozd)
summary: - table action message is not translated easily
+ table action message is not translated properly
tags: added: action
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/268715

Changed in horizon:
importance: Undecided → Low
milestone: none → mitaka-3
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/268715
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.

Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Removed assignee due to inactivity; if you find time to fix the bug, feel free to reassign yourself! :)

tags: added: i18n
removed: action
Changed in horizon:
status: In Progress → Confirmed
milestone: mitaka-3 → ongoing
assignee: liao_zd@hotmail.com (liaozd) → nobody
Changed in horizon:
milestone: ongoing → next
Changed in horizon:
assignee: nobody → Robert MIZIELSKI (rxoct21)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Clear the assignee due to inactivity

Changed in horizon:
assignee: Robert MIZIELSKI (rxoct21) → nobody
Revision history for this message
Akihiro Motoki (amotoki) wrote :

BatchAction now supports action_present and action_past to allow action developers to specify full message of actions. As a result, each action message can be translated in a meaningful piece.

msg = _('%(action)s: %(objs)s') is just a fallback logic and actually is not intended to use. I believe this can be kept as is.

Changed in horizon:
status: Confirmed → Won't Fix
milestone: next → none
Revision history for this message
Akihiro Motoki (amotoki) wrote :

On a second thought, it looks better to add some translator notes to the message _('(action)s: %(objs)s').

Changing messages of all action_past methods is not feasible and they are also used for error message.
The reason this message is marked as translatable is to allow translators to control or change some corner cases, though the basic suggested way is to use it as is.

Changed in horizon:
status: Won't Fix → Confirmed
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.