yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #23202
[Bug 1253174] Re: Translators cannot control more than two plural forms in message string of BatchAction
** Changed in: horizon
Status: Fix Committed => 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/1253174
Title:
Translators cannot control more than two plural forms in message
string of BatchAction
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
Reported in comment #2 of bug 1252082.
In some languages the number of plural forms is more than two,
but horizon only supports one type of plural form and translators cannot
control more than two plural forms.
The following description is quoted from bug 1252082.
I am not sure it works.
----
In general plural form problem can be handled with ungettext_lazy.
https://docs.djangoproject.com/en/dev/topics/i18n/translation/#lazy-translations-and-plural
I think we need to change all classes inherited BatchAction and DeleteAction. I haven't tested below.
IMO it is better to be fixed separately.
The following is an example of DeleteNetwork:
(https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/project/networks/tables.py#L42)
class DeleteNetwork(CheckNetworkEditable, tables.DeleteAction):
data_type = ungettext_lazy("Network", "Networks", "_count")
and change horizon/tables/action.py
data_type = self.data_type % {'_count': <num_of_items>}
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1253174/+subscriptions