Opened 16 years ago
Closed 16 years ago
#10956 closed (invalid)
Possible typo in documentation - topics/i18n/
Reported by: | stranded | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.0 |
Severity: | Keywords: | javascript, typo | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the example for Named interpolation in javascript on link http://docs.djangoproject.com/en/dev/topics/i18n/#topics-i18n is sais:
fmts = ngettext('Total: %(total)s, there is %(count)s object',
'there are %(count)s of a total of %(total)s objects', d.count);
s = interpolate(fmts, d, true);
should it not be d and not d.count in the ngettext function?
Cheers,
Tommy
Note:
See TracTickets
for help on using tickets.
No, the doc is correct. In this case,
d.count
is used to determine whether the singular or plural form should be used.