#15981 closed Cleanup/optimization (fixed)
Use ungettext instead of _ for naturaltime
| Reported by: | Gasper Zejn | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.humanize | Version: | 1.3 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I went updating translation today and I see that naturaltime template filter uses gettext improperly which as a consequence makes it hard to translate.
Attached patch fixes this and also removes redundant if clauses.
Attachments (1)
Change History (5)
by , 15 years ago
| Attachment: | ungettext_naturaltime.py added |
|---|
comment:3 by , 15 years ago
Shouldn't the first argument in return ungettext(u'%s seconds ago', u'%s seconds ago', delta.seconds) be u'a second ago'?
Note:
See TracTickets
for help on using tickets.
ungettext_naturaltime - fix gettext in naturaltime template filter