yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #58572
[Bug 1626312] Re: "Detach Volume" is unlocalized Project > Instances action menu, window title and button
Reviewed: https://review.openstack.org/375916
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7d8d1fa7cd6757ee122a1b706519ad015ecd07bf
Submitter: Jenkins
Branch: master
commit 7d8d1fa7cd6757ee122a1b706519ad015ecd07bf
Author: Akihiro Motoki <motoki@xxxxxxxxxxxxx>
Date: Sun Sep 25 00:29:14 2016 +0000
Make "Detach Volume" in Instances page translatable
Due to tricky behavior of gettext, if we have both normal
gettext string and plural gettext string for a same string,
the normal gettext string is not translated.
(The detail is described in the bug report. See comment #5.)
As a workaround, this commit adds a context information to
the plural gettext string in volumes.volumes.tables.DetachVolume
so that we can have separate entries for a normal entry and
an entry with plural form support. By doing so, gettext can
find an expected translated string for a normal string.
After this change, we will see the following entries
for "Detach Volume" in the generated PO file.
----
msgid "Detach Volume"
msgstr ""
msgctxt "Action to perform (the volume is currently attached)"
msgid "Detach Volume"
msgid_plural "Detach Volumes"
msgstr[0] ""
msgstr[1] ""
----
Note that the message "Detaching Volume" for the post action
in the table is also updated to use npgettext_lazy.
This and "Detach Volume" are a pair, so it looks better to
use a same style.
Change-Id: Idf772265d3e0e1d2e74b19755a467e1433233f64
Closes-Bug: #1626312
** Changed in: horizon
Status: In Progress => Fix Released
--
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/1626312
Title:
"Detach Volume" is unlocalized Project > Instances action menu, window
title and button
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
openstack_dashboard/dashboards/project/instances/tables.py:937
openstack_dashboard/dashboards/project/instances/views.py:489
openstack_dashboard/dashboards/project/instances/views.py:491
The string "Detach Volume" is unlocalized in 3 places:
1. Action menu
2. Window title
3. Action button in the window
The same text appears in Manager Attachments on the Volumes tab is localized
(openstack_dashboard/dashboards/project/volumes/volumes/tables.py:521)
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1626312/+subscriptions
References