Opened 16 years ago
Closed 11 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 , 16 years ago
Status: | new → assigned |
---|
comment:2 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:3 by , 16 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 , 16 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 , 14 years ago
Summary: | Allow pluralize filter to consider zero as a singular form → Add a template filter similar to pluralize but i18n-aware regarding plural form rules |
---|---|
Triage Stage: | Design decision needed → Accepted |
comment:6 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:9 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | assigned → 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.
For the record, here is the thread: http://groups.google.com/group/Django-I18N/browse_thread/thread/465b902db0c7dea9