mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-26 05:03:45 +00:00
replace force_text to support django 3
This commit is contained in:
parent
68bd9dcf36
commit
a7c0482b94
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
from contextlib import contextmanager
|
||||
|
||||
import six
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.encoding import force_str
|
||||
from django.utils.translation import get_language as _get_language
|
||||
from django.utils.translation import get_language_info
|
||||
from django.utils.functional import lazy
|
||||
|
|
@ -51,7 +51,7 @@ def build_localized_fieldname(field_name, lang):
|
|||
def _build_localized_verbose_name(verbose_name, lang):
|
||||
if lang == 'id':
|
||||
lang = 'ind'
|
||||
return force_text('%s [%s]') % (force_text(verbose_name), lang)
|
||||
return force_str('%s [%s]') % (force_str(verbose_name), lang)
|
||||
build_localized_verbose_name = lazy(_build_localized_verbose_name, six.text_type)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue