Opened 5 years ago
Closed 5 years ago
#31037 closed Bug (invalid)
Template truncatechars dots missing.
Reported by: | 老广 | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 2.2 |
Severity: | Normal | Keywords: | truncatechars |
Cc: | ibuler@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django 2.1.14 work fine, version 2.2.x has bug
{{ "Hello Django" | truncatechars:10 }}
Django 2.1.x output: Hello D...
Django 2.2.x output: Hello Djan
But the doc match the first case
https://docs.djangoproject.com/en/2.2/ref/templates/builtins/#truncatechars
Change History (4)
follow-up: 2 comment:1 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Summary: | Template truncatechars dots missing → Template truncatechars dots missing. |
comment:2 by , 5 years ago
Replying to felixxm:
truncatechars
now uses the real ellipsis character (…) instead of 3 dots, this is a documented and expected change.
{{ "Hello Django" | truncatechars:10 }}
returnsHello Dja…
for me.
I found the bug, It's because the Django locale zh-hans Lost the ellipsis
#, python-format
msgctxt "String to return when truncating text"
msgid "%(truncated_text)s…"
msgstr "%(truncated_text)s"
comment:3 by , 5 years ago
Resolution: | invalid |
---|---|
Status: | closed → new |
comment:4 by , 5 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thanks for the report, however, translations are handled at Transifex and not in this tracker.
truncatechars
now uses the real ellipsis character (…) instead of 3 dots, this is a documented and expected change.{{ "Hello Django" | truncatechars:10 }}
returnsHello Dja…
for me.