Opened 8 years ago

Closed 2 years ago

#9974 closed New feature (wontfix)

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

Reported by: david Owned by: david
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


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 Changed 8 years ago by david

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 7 years ago by jacob

  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by mtredinnick

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 Changed 7 years ago by david

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 Changed 6 years ago by ramiro

  • Summary changed from Allow pluralize filter to consider zero as a singular form to Add a template filter similar to pluralize but i18n-aware regarding plural form rules
  • Triage Stage changed from Design decision needed to Accepted

comment:6 Changed 5 years ago by SmileyChris

  • Severity set to Normal
  • Type set to New feature

comment:7 Changed 4 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:8 Changed 4 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:9 Changed 2 years ago by aaugustin

  • Resolution set to wontfix
  • Status changed from assigned to closed

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