Skip to content

Replace uggettext_lazy with gettext_lazy to support Django 4.0#34

Open
za wants to merge 2 commits intokbytesys:masterfrom
za:replace-uggettext
Open

Replace uggettext_lazy with gettext_lazy to support Django 4.0#34
za wants to merge 2 commits intokbytesys:masterfrom
za:replace-uggettext

Conversation

@za
Copy link
Copy Markdown
Contributor

@za za commented Jul 16, 2022

django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are removed.

https://docs.djangoproject.com/en/4.0/releases/4.0/#features-removed-in-4-0

Django trac ticket: https://code.djangoproject.com/ticket/30165

@za
Copy link
Copy Markdown
Contributor Author

za commented Aug 16, 2022

Hi @kbytesys do you have any comment/feedback on this PR? Thank you.

@thisisayush
Copy link
Copy Markdown

+1 on this, this is needed!

@valbertovc
Copy link
Copy Markdown

+1 will be a great improvement.

@subaquatic-pierre
Copy link
Copy Markdown

+1 Please update this!

Copy link
Copy Markdown

@subaquatic-pierre subaquatic-pierre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

@za
Copy link
Copy Markdown
Contributor Author

za commented Aug 18, 2023

Oh, it's been a year. Can we merge it soon? @subaquatic-pierre

@iRhonin
Copy link
Copy Markdown

iRhonin commented May 28, 2024

+1

@becory
Copy link
Copy Markdown

becory commented Oct 14, 2024

@kbytesys Can you merge it? I have this problem, too.

@za
Copy link
Copy Markdown
Contributor Author

za commented Oct 14, 2024

✏️ FTR currently, Django stable version is 5.x.x

@becory
Copy link
Copy Markdown

becory commented Oct 14, 2024

This is the solution I found to add this code to resolve this problem until it is merged.

add them in settings.py in front of "INSTALLED_APPS" variable.

import django.utils.translation as original_translation
from django.utils.translation import gettext_lazy

original_translation.ugettext_lazy = gettext_lazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants