Opened 15 years ago

Closed 10 years ago

#9974 closed New feature (wontfix)

Add a template filter similar to pluralize but i18n-aware regarding plural form rules

Reported by: David Larlet Owned by: David Larlet
Component: Template system Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

That's the case in French and probably with other languages, I can provide the fix but a design decision is needed on how to do this.

It can be an argument on the pluralize filter or a new filter in localflavor but it seems overkill to me.

Change History (9)

comment:1 by David Larlet, 15 years ago

Status: newassigned

comment:2 by Jacob, 15 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by Malcolm Tredinnick, 15 years ago

For anybody wondering if there was any resolution here: we've been leaning towards writing a localisation-aware pluralisation filter or something. Extending the existing one will complicate things a lot and isn't worth the ongoing maintenance pain. Existing pluralize is for English (and things that can pretend to be English). For localised versions, it's harder and more work and experimenting is needed (details of that require reading the above thread that David linked to).

comment:4 by David Larlet, 15 years ago

Yes, I had emailed the author of plural_to_python (linked in the thread) when I found the link without any answer for now.

comment:5 by Ramiro Morales, 13 years ago

Summary: Allow pluralize filter to consider zero as a singular formAdd a template filter similar to pluralize but i18n-aware regarding plural form rules
Triage Stage: Design decision neededAccepted

comment:6 by Chris Beaven, 13 years ago

Severity: Normal
Type: New feature

comment:7 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:8 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:9 by Aymeric Augustin, 10 years ago

Resolution: wontfix
Status: assignedclosed

This is very difficult to get right in English -- as the Rails people learnt the hard way -- and I cannot imagine maintaining this for French.

There's no fundamental reason for such a template tag to live in Django. It's better to leave this feature to a third-party library.

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