Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12940 closed (fixed)

Comments admin should use ungettext instead of ugettext

Reported by: void Owned by: nobody
Component: contrib.comments Version: master
Severity: Keywords: i18n, comments
Cc: kmike 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 void 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by void

comment:2 Changed 4 years ago by dc

  • Has patch set
  • milestone set to 1.2

Please fix this before strings freeze.

comment:3 Changed 4 years ago by kmike

  • Cc kmike added

comment:4 Changed 4 years ago by jacob

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.