Opened 7 years ago

Closed 6 years ago

Last modified 5 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: UI/UX:

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 7 years ago.
12278.2.diff (613 bytes) - added by Tim Graham 6 years ago.
updated patch for file location change

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Tim Graham

Attachment: 12278.diff added

comment:1 Changed 7 years ago by Tim Graham

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

Changed 6 years ago by Tim Graham

Attachment: 12278.2.diff added

updated patch for file location change

comment:2 Changed 6 years ago by Tim Graham

milestone: 1.2

comment:3 Changed 6 years ago by Russell Keith-Magee

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 Changed 6 years ago by Russell Keith-Magee

(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 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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