Comment 3 for bug 1252082

Revision history for this message
Akihiro Motoki (amotoki) wrote : Re: Message string of BatchAction is hard to translate

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>}