Opened 17 years ago
Closed 17 years ago
#10662 closed (invalid)
lazy translation cannot be evaluated in string operation
| Reported by: | liangent | Owned by: | nobody |
|---|---|---|---|
| Component: | Internationalization | Version: | 1.0 |
| Severity: | Keywords: | liangent@gmail.com | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
a = ugettext_lazy('sth')
b = 'x%s' % a
c = 'x' + a
both b and c contain something like <django. ... .proxy at ...> in them.
i have to write
a = ugettext_lazy('sth')
b = 'x%s' % unicode(a)
c = 'x' + unicode(a)
to get the expected result
Note:
See TracTickets
for help on using tickets.
This is expected behaviour. Read the documentation carefully and use
or
b = string_concat('x', a)