Add missing `lang` attributes to `<html>` elements. Fix #8212 (#8220)

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
pull/8258/head
James Ray 2022-04-01 15:50:47 -07:00 zatwierdzone przez GitHub
rodzic 1adc82c044
commit 2cae3083f5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
9 zmienionych plików z 27 dodań i 8 usunięć

Wyświetl plik

@ -51,6 +51,7 @@ Changelog
* Fix: Remove redundant `role="main"` attributes on `<main>` elements causing HTML validation issues (Luis Espinoza)
* Fix: Allow bulk publishing of pages without revisions (Andy Chosak)
* Fix: Stop skipping heading levels in Wagtail welcome page (Jesse Menn)
* Fix: Add missing `lang` attributes to `<html>` elements (James Ray)
2.16.2 (xx.xx.xxxx) - IN DEVELOPMENT

Wyświetl plik

@ -578,6 +578,7 @@ Contributors
* Luis Espinoza
* Hitansh Shah
* Saurabh kumar
* James Ray
Translators
===========

Wyświetl plik

@ -85,6 +85,7 @@ class LandingPage(Page):
* Remove redundant `role="main"` attributes on `<main>` elements causing HTML validation issues (Luis Espinoza)
* Allow bulk publishing of pages without revisions (Andy Chosak)
* Stop skipping heading levels in Wagtail welcome page (Jesse Menn)
* Add missing `lang` attributes to `<html>` elements (James Ray)
## Upgrade considerations

Wyświetl plik

@ -1,6 +1,8 @@
{% load i18n wagtailadmin_tags %}
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>

Wyświetl plik

@ -1,5 +1,8 @@
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE html>
<html>
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
<head>
<meta charset="utf-8" />
<title>Internal server error</title>

Wyświetl plik

@ -1,6 +1,9 @@
{% load i18n %}
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE HTML>
<html>
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
<head>
<title>{% trans "Log in" %}</title>
</head>

Wyświetl plik

@ -1,5 +1,8 @@
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE HTML>
<html>
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
<head>
<title>{{ self.title }}</title>
</head>

Wyświetl plik

@ -1,6 +1,9 @@
{% load i18n %}
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE HTML>
<html>
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
<head>
<title>{% trans "Password required" %}</title>
</head>

Wyświetl plik

@ -1,7 +1,9 @@
{% load wagtailuserbar %}
{% load wagtailadmin_tags i18n %}
{% get_current_language as LANGUAGE_CODE %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE HTML>
<html>
<html lang="{{ LANGUAGE_CODE }}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}">
<head>
<title>{% block html_title %}{{ self.title }}{% endblock %}</title>
</head>