Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#12278 closed (fixed)

Doc bug: django.utils.translation.string_concat does not take list as argument

Reported by: William Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Current source (docs/topics/i18n.txt):

427	    from django.utils.translation import string_concat
428	    ...
429	    name = ugettext_lazy(u'John Lennon')
430	    instrument = ugettext_lazy(u'guitar')
431	    result = string_concat([name, ': ', instrument])

This will result in something like this when forced to unicode: u"[<django.utils.functional.__proxy__ object at 0x1af1d10>, ': ', <django.utils.functional.__proxy__ object at 0x1af1c70>]"

Should be:

result = string_concat(name, ': ', instrument)

Attachments (2)

12278.diff (550 bytes ) - added by Tim Graham 15 years ago.
12278.2.diff (613 bytes ) - added by Tim Graham 14 years ago.
updated patch for file location change

Download all attachments as: .zip

Change History (7)

by Tim Graham, 15 years ago

Attachment: 12278.diff added

comment:1 by Tim Graham, 15 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

by Tim Graham, 14 years ago

Attachment: 12278.2.diff added

updated patch for file location change

comment:2 by Tim Graham, 14 years ago

milestone: 1.2

comment:3 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

(In [13167]) Fixed #12278 -- Corrected an example usage of string_concat. Thanks to loumz for the report, and timo for the patch.

comment:4 by Russell Keith-Magee, 14 years ago

(In [13173]) [1.1.X] Fixed #12278 -- Corrected an example usage of string_concat. Thanks to loumz for the report, and timo for the patch.

Backport of r13167 from trunk.

comment:5 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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