Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#12278 closed (fixed)

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

Reported by: loumz 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 timo 5 years ago.
12278.2.diff (613 bytes) - added by timo 5 years ago.
updated patch for file location change

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by timo

comment:1 Changed 5 years ago by timo

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

Changed 5 years ago by timo

updated patch for file location change

comment:2 Changed 5 years ago by timo

  • milestone set to 1.2

comment:3 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

(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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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