Skip to content

Commit

Permalink
Remove uses of django.utils.translation.ugettext
Browse files Browse the repository at this point in the history
This is just an alias of django.utils.translation.gettext on Python 3,
and it's deprecated starting Django 3.0.
  • Loading branch information
quantum5 committed Oct 16, 2021
1 parent 4238e95 commit 394e97e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dmoj/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import os
import tempfile

from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django_jinja.builtins import DEFAULT_EXTENSIONS
from jinja2 import select_autoescape

Expand Down
2 changes: 1 addition & 1 deletion dmoj/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.templatetags.static import static
from django.urls import path, reverse
from django.utils.functional import lazy
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.views.generic import RedirectView
from martor.views import markdown_search_user

Expand Down
2 changes: 1 addition & 1 deletion judge/utils/problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_result_data(results):
return {
'categories': [
# Using gettext_noop here since this will be tacked into the cache, so it must be language neutral.
# The caller, SubmissionList.get_result_data will run ugettext on the name.
# The caller, SubmissionList.get_result_data will run gettext on the name.
{'code': 'AC', 'name': gettext_noop('Accepted'), 'count': results['AC']},
{'code': 'WA', 'name': gettext_noop('Wrong'), 'count': results['WA']},
{'code': 'CE', 'name': gettext_noop('Compile Error'), 'count': results['CE']},
Expand Down
2 changes: 1 addition & 1 deletion judge/views/blog.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.http import Http404
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _
from django.views.generic import ListView

from judge.comments import CommentedDetailView
Expand Down

0 comments on commit 394e97e

Please # to comment.