Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12940 closed (fixed)

Comments admin should use ungettext instead of ugettext

Reported by: Alexey Boriskin Owned by: nobody
Component: contrib.comments Version: master
Severity: Keywords: i18n, comments
Cc: Mikhail Korobov Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Currently django.contrib.comments.admin use ugettext for actions' descriptions:

    self._bulk_flag(request, queryset, perform_approve, _('approved'))

That is because of there is no difference in English between word "approved" in phrases "1 comment was approved" and "5 comments were approved". But it's not a common for all languages. For example, verb "to approve" in passive voice in Russian would produce different forms for single and plural forms. Therefore, django.contrib.comments.admin should use ungettext instead of ugettext.

Attachments (1)

12940.txt (2.2 KB) - added by Alexey Boriskin 7 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

Changed 7 years ago by Alexey Boriskin

Attachment: 12940.txt added

comment:2 Changed 7 years ago by dc

Has patch: set
milestone: 1.2

Please fix this before strings freeze.

comment:3 Changed 7 years ago by Mikhail Korobov

Cc: Mikhail Korobov added

comment:4 Changed 7 years ago by Jacob

Triage Stage: AcceptedReady for checkin

comment:5 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [12770]) Fixed #12940 -- Modified some admin actions in contrib.comments to use ungettext in order to support Russian (and similar) pluralization rules. Thanks to void for the report and patch.

comment:6 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top