Opened 8 years ago

Closed 8 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: UI/UX:

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

Change History (1)

comment:1 Changed 8 years ago by Julien Phalip

Resolution: invalid
Status: newclosed

No, the doc is correct. In this case, d.count is used to determine whether the singular or plural form should be used.

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