Skip to content

Commit

Permalink
Clean up deprecated usage of ugettext_lazy and ifequal
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjaclasher committed Mar 13, 2024
1 parent 1c35bec commit 8f245c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wpadmin/menu/items.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re

from django.utils.text import capfirst
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from wpadmin.menu.utils import UserTestElementMixin, AppListElementMixin

Expand Down
2 changes: 1 addition & 1 deletion wpadmin/menu/menus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from django.conf import settings
from django.urls import reverse

Expand Down
2 changes: 1 addition & 1 deletion wpadmin/templates/admin/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
{% paginator_number cl i %}
{% endfor %}
{% endif %}
<span class="total">{{ cl.result_count }} {% ifequal cl.result_count 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endifequal %}</span>
<span class="total">{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}</span>
{% if show_all_url %}&nbsp;&nbsp;<a href="{{ show_all_url }}" class="showall">{% trans 'Show all' %}</a>{% endif %}
</p>
2 changes: 1 addition & 1 deletion wpadmin/templatetags/wpadmin_tags.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django import template
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from wpadmin.utils import (
get_admin_site_name, get_wpadmin_settings, are_breadcrumbs_enabled)
Expand Down

0 comments on commit 8f245c7

Please sign in to comment.