Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up deprecated usage of ugettext_lazy and ifequal #7

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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