Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#14735 closed (fixed)

Wrong plural formulation in search_form.html

Reported by: Claude Paroz Owned by: Claude Paroz
Component: contrib.admin Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In search_form.html template from contrib.admin, the singular of the search results message is using a number (1) instead of the variable:

  {% blocktrans count cl.result_count as counter %}1 result{% plural %}{{ counter }} results{% endblocktrans %}

This is fine in English, but is causing issues in languages where the singular might be used with more than one number, like 0 and 1 for French. Fix is trivial and requires using {{ counter }} in singular form also.

Attachments (2)

search_results_plural.diff (1.2 KB ) - added by Claude Paroz 14 years ago.
Add variable in singular form also
search_results_plural_zh.diff (4.1 KB ) - added by Claude Paroz 14 years ago.
Include Chinese translations fixes

Download all attachments as: .zip

Change History (7)

by Claude Paroz, 14 years ago

Attachment: search_results_plural.diff added

Add variable in singular form also

comment:1 by Jannis Leidel, 14 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 14 years ago

I looked at current translations, and my opinion is that we should not backport this fix, as it will break translations for a rather visible string and I doubt we have the required knowledge to guess the right change in various languages (64!).
I'm adding a second patch which includes fixes for Chinese translations, as the required changes to make them msgfmt -vc compliant are trivial. I let the committer decide if he wants to include translation fixes in the same commit or not.

by Claude Paroz, 14 years ago

Include Chinese translations fixes

comment:3 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: newclosed

(In [14770]) Fixed #14735 -- Corrected plural formulation in admin search form template. Thanks, Claude.

comment:4 by Jannis Leidel, 14 years ago

(In [14771]) Fixed #11161 -- Added plural forms to all supported languages. Fixed other errors in the translation files that prevented them to pass the msgfmt check in preparation for the move to Transifex. Refs #14735, too.

comment:5 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

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