diff --git a/markdownx/exceptions.py b/markdownx/exceptions.py index 38c093f..2a871e8 100644 --- a/markdownx/exceptions.py +++ b/markdownx/exceptions.py @@ -1,10 +1,10 @@ -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.forms import ValidationError class MarkdownxImageUploadError(ValidationError): """ - Custom **MarkdownX** exceptions. + Custom **MarkdownX** exceptions. """ @classmethod @@ -13,9 +13,9 @@ class MarkdownxImageUploadError(ValidationError): No file is available to upload. :return: Locale compatible version of the error with the following message: - + - No files have been uploaded. - + :rtype: MarkdownxImageUploadError """ return cls(_('No files have been uploaded.')) @@ -23,14 +23,14 @@ class MarkdownxImageUploadError(ValidationError): @classmethod def unsupported_format(cls): """ - + The file is of a format not defined in :guilabel:`settings.py` or if default, in :guilabel:`markdownx/settings.py`. :return: Locale compatible version of the error with the following message: - - - File type is not supported. - + + - File type is not supported. + :rtype: MarkdownxImageUploadError """ return cls(_('File type is not supported.')) @@ -45,9 +45,9 @@ class MarkdownxImageUploadError(ValidationError): :param expected: Expected (maximum permitted) size of the file. :type expected: float, int :return: Locale compatible version of the error with the following message: - + - Please keep file size under %(max)s. Current file size: %(current)s.' - + :rtype: MarkdownxImageUploadError """ from django.template.defaultfilters import filesizeformat diff --git a/markdownx/settings.py b/markdownx/settings.py index 1b3619a..60b9339 100755 --- a/markdownx/settings.py +++ b/markdownx/settings.py @@ -1,6 +1,6 @@ # Django library. from django.conf import settings -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.core.exceptions import ImproperlyConfigured