Comment 5 for bug 1980214

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/c/openstack/horizon/+/851262
Committed: https://opendev.org/openstack/horizon/commit/b893bcdee32a640f148e1682485da849f0058f31
Submitter: "Zuul (22348)"
Branch: master

commit b893bcdee32a640f148e1682485da849f0058f31
Author: Akihiro Motoki <email address hidden>
Date: Thu Jul 28 04:29:58 2022 +0900

    Make site_branding tag work with Django 4.0

    A test for site_branding tag starts to fail with Django 4.0.
    It seems to happen as settings.SITE_BRANDING is _("Horizon") and
    a translation marker _() is no longer evaluated during rendering.

    As a solution, this commit changes the implementation of
    site_branding tag to use "simple_tag" method
    as django.template.Library.simple_tag() [1] seems to handle
    an i18n-ed string properly.

    [1] https://docs.djangoproject.com/en/4.0/howto/custom-template-tags/#simple-tags

    Closes-Bug: #1980214
    Change-Id: I6fdfffbeef2b405da21289d37722e3f068e27fea