diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2019-06-27 09:39:47 -0700 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-06-28 16:46:18 +0200 |
commit | 42b9a23267f14be39b9b00958e18d5746783208e (patch) | |
tree | f19f6a2cd70025744ad9d668a15a0c0a5ed8aac3 /django/core/validators.py | |
parent | 2b03e8e9e8205ae3a3aa128764277e70b7c30803 (diff) | |
download | django-42b9a23267f14be39b9b00958e18d5746783208e.tar.gz |
Fixed #30400 -- Improved typography of user facing strings.
Thanks Claude Paroz for assistance with translations.
Diffstat (limited to 'django/core/validators.py')
-rw-r--r-- | django/core/validators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index 38e4b6aa1d..827b1eea09 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -236,14 +236,14 @@ slug_re = _lazy_re_compile(r'^[-a-zA-Z0-9_]+\Z') validate_slug = RegexValidator( slug_re, # Translators: "letters" means latin letters: a-z and A-Z. - _("Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."), + _('Enter a valid “slug” consisting of letters, numbers, underscores or hyphens.'), 'invalid' ) slug_unicode_re = _lazy_re_compile(r'^[-\w]+\Z') validate_unicode_slug = RegexValidator( slug_unicode_re, - _("Enter a valid 'slug' consisting of Unicode letters, numbers, underscores, or hyphens."), + _('Enter a valid “slug” consisting of Unicode letters, numbers, underscores, or hyphens.'), 'invalid' ) @@ -466,8 +466,8 @@ class DecimalValidator: @deconstructible class FileExtensionValidator: message = _( - "File extension '%(extension)s' is not allowed. " - "Allowed extensions are: '%(allowed_extensions)s'." + 'File extension “%(extension)s” is not allowed. ' + 'Allowed extensions are: %(allowed_extensions)s.' ) code = 'invalid_extension' |