summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2018-08-21 15:28:51 +0200
committerClaude Paroz <claude@2xlibre.net>2018-08-21 17:46:45 +0200
commit201017df308266c7d5ed20181e6d0ffa5832e3e9 (patch)
treeb0ef49951614962cdd7409158ffd06b7f3b9bb55 /django/utils/text.py
parent939dcff24f8e97d114595b102fb12348da482135 (diff)
downloaddjango-201017df308266c7d5ed20181e6d0ffa5832e3e9.tar.gz
Fixed #29654 -- Made text truncation an ellipsis character instead of three dots.
Thanks Sudhanshu Mishra for the initial patch and Tim Graham for the review.
Diffstat (limited to 'django/utils/text.py')
-rw-r--r--django/utils/text.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/django/utils/text.py b/django/utils/text.py
index e980f7170f..0e41cac493 100644
--- a/django/utils/text.py
+++ b/django/utils/text.py
@@ -64,7 +64,7 @@ class Truncator(SimpleLazyObject):
if truncate is None:
truncate = pgettext(
'String to return when truncating text',
- '%(truncated_text)s...')
+ '%(truncated_text)s…')
if '%(truncated_text)s' in truncate:
return truncate % {'truncated_text': text}
# The truncation text didn't contain the %(truncated_text)s string
@@ -81,8 +81,7 @@ class Truncator(SimpleLazyObject):
of characters.
`truncate` specifies what should be used to notify that the string has
- been truncated, defaulting to a translatable string of an ellipsis
- (...).
+ been truncated, defaulting to a translatable string of an ellipsis.
"""
self._setup()
length = int(num)
@@ -123,7 +122,7 @@ class Truncator(SimpleLazyObject):
"""
Truncate a string after a certain number of words. `truncate` specifies
what should be used to notify that the string has been truncated,
- defaulting to ellipsis (...).
+ defaulting to ellipsis.
"""
self._setup()
length = int(num)