From 8da77783281c58e60d67d4a3c164cb3449974377 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Thu, 18 Jan 2024 11:54:24 +0100 Subject: [PATCH] Add dir attribute to the html tag, ltr/rtl. (#3728) Fixes #3726 --- hypha/templates/base-apply.html | 3 ++- hypha/templates/base.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hypha/templates/base-apply.html b/hypha/templates/base-apply.html index c0416d103..5090295df 100644 --- a/hypha/templates/base-apply.html +++ b/hypha/templates/base-apply.html @@ -1,7 +1,8 @@ {% load i18n static wagtailcore_tags wagtailimages_tags navigation_tags util_tags hijack cookieconsent_tags %}<!doctype html> {% wagtail_site as current_site %} {% get_current_language as LANGUAGE_CODE %} -<html class="no-js" lang="{{ LANGUAGE_CODE }}"> +{% get_current_language_bidi as LANGUAGE_BIDI %} +<html class="no-js" lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}"> <head> {# TODO fallbacks if page is not defined e.g. for 404 page #} <meta charset="utf-8"> diff --git a/hypha/templates/base.html b/hypha/templates/base.html index a4dff98fe..7f782c719 100644 --- a/hypha/templates/base.html +++ b/hypha/templates/base.html @@ -1,7 +1,8 @@ {% load static cache wagtailcore_tags wagtailimages_tags navigation_tags util_tags cookieconsent_tags i18n %}<!doctype html> {% wagtail_site as current_site %} {% get_current_language as LANGUAGE_CODE %} -<html class="no-js" lang="{{ LANGUAGE_CODE }}"> +{% get_current_language_bidi as LANGUAGE_BIDI %} +<html class="no-js" lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}"> <head> {# TODO fallbacks if page is not defined e.g. for 404 page #} <meta charset="utf-8"> -- GitLab