Skip to content
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
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ For example, the _Translators: Icelandic (latest)_ group has access to:

When working on changes to the "latest" source content in English, make sure to avoid unnecessarily removing and adding StreamField blocks, so block references are stable between revisions.

#### RTL support

The guide supports right-to-left languages, like Arabic and Hebrew. All layout and styling changes must work correctly in both LTR and RTL.

If you're unsure whether something should mirror or stay fixed, start a thread in [GitHub Discussions](https://github.com/wagtail/guide/discussions) or the #editor-guide channel of the [Wagtail Slack workspace](https://github.com/wagtail/wagtail/wiki/Slack).

### Versioning

Our default "latest" version of the guide corresponds to Wagtail’s release currently in development. When Wagtail has a new release, we create a copy of the guide’s "latest" content for that release. Here are the preliminary steps to do this:
Expand Down
5 changes: 3 additions & 2 deletions apps/core/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% load core_tags wagtailcore_tags wagtailroutablepage_tags wagtailuserbar manifest %}
{% load core_tags wagtailcore_tags wagtailroutablepage_tags wagtailuserbar manifest i18n %}

{% wagtail_site as current_site %}
{% get_current_language_bidi as LANGUAGE_BIDI %}
<!DOCTYPE html>
<html lang="{% block lang %}{% get_language_from_language_code self.locale.language_code %}{% endblock %}" class="no-js">
<html lang="{% block lang %}{% get_language_from_language_code self.locale.language_code %}{% endblock %}" dir="{% if LANGUAGE_BIDI %}rtl{% else %}ltr{% endif %}" class="no-js">
<head>
<meta charset="utf-8" />
<title>
Expand Down
2 changes: 1 addition & 1 deletion apps/core/templates/components/feedback.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="feedback">
{% csrf_token %}
<div class="feedback__container" data-feedback-container>
<h2 class="feedback__heading">{% trans 'Was this page helpful?' %}</h2>
<h2 class="feedback__heading" dir="auto">{% trans 'Was this page helpful?' %}</h2>
<div class="feedback__options">
<button class="feedback__button" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="{% trans 'This page was helpful' %}" data-bs-trigger="hover" data-happy-button aria-label="{% trans 'Happy' %}">
{% include "./svg/happy.svg" %}
Expand Down
4 changes: 2 additions & 2 deletions apps/core/templates/components/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% endwith %}
</div>
<div class="link-block__content">
<h2 class="link-block__heading">{{ footer_item.title }}</h2>
<div class="link-block__description">
<h2 class="link-block__heading" dir="auto">{{ footer_item.title }}</h2>
<div class="link-block__description" dir="auto">
{{ footer_item.description }}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/core/templates/components/language_selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
{% if page %}
<button class="language-selector__toggle dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{% get_language_info for LANGUAGE_CODE as lang %}
<span class="language-selector__label">{{ lang.name_translated }} {% if page %}({% get_version_from_language_code page.localized.locale.language_code %}){% endif %}</span>
<span class="language-selector__label" dir="auto">{{ lang.name_translated }} {% if page %}({% get_version_from_language_code page.localized.locale.language_code %}){% endif %}</span>
</button>
{% spaceless %}
<ul class="language-selector__dropdown dropdown-menu">
{% for translation in page.get_translations.live %}
{% get_language_info for translation.locale.language_code as lang %}
<li>
<a href="{% pageurl translation %}" rel="alternate" hreflang="{% get_language_from_language_code translation.locale.language_code %}" class="language-selector__dropdown-item dropdown-item">
<a href="{% pageurl translation %}" rel="alternate" hreflang="{% get_language_from_language_code translation.locale.language_code %}" class="language-selector__dropdown-item dropdown-item" dir="auto">
{{ lang.name_local }} ({% get_version_from_language_code translation.locale.language_code %})
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions apps/core/templates/components/nav_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
{% if previous %}
<a href="{% pageurl previous %}" class="nav-buttons__link" rel="prev">
{% include "core/svg/arrow.svg" %}
<div class="nav-buttons__label">
<div class="nav-buttons__label" dir="auto">
{{ previous }}
</div>
</a>
{% endif %}
{% if next %}
<a href="{% pageurl next %}" class="nav-buttons__link" rel="next">
<div class="nav-buttons__label">
<div class="nav-buttons__label" dir="auto">
{{ next }}
</div>
{% include "core/svg/arrow.svg" %}
Expand Down
2 changes: 1 addition & 1 deletion apps/core/templates/components/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</li>
<li class="navigation__item">
{% endif %}
<a href="{% pageurl item %}" class="navigation__link{% if info.level == 0 %} navigation__link--heading{% endif %}{% if item.id == current_page.id %} active{% endif %}">{{ item }}</a>
<a href="{% pageurl item %}" class="navigation__link{% if info.level == 0 %} navigation__link--heading{% endif %}{% if item.id == current_page.id %} active{% endif %}" dir="auto">{{ item }}</a>
{% for close in info.close %}
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion apps/core/templates/core/blocks/alert.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="alert__icon">
{% include self.icon %}
</div>
<div class="alert__heading">{% trans self.alert_type %}</div>
<div class="alert__heading" dir="auto" >{% trans self.alert_type %}</div>
</div>
<div class="alert__content">
{{ self.alert_body|richtext }}
Expand Down
4 changes: 2 additions & 2 deletions apps/core/templates/core/blocks/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
{% include self.icon %}
</div>
<div class="section__content">
<h2 class="section__heading">{{ self.title }}</h2>
<p class="section__description">{{ self.text }}</p>
<h2 class="section__heading" dir="auto">{{ self.title }}</h2>
<p class="section__description" dir="auto">{{ self.text }}</p>
</div>
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/core/templates/core/content_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load wagtailcore_tags core_tags i18n %}

{% block content %}
<h1 class="heading heading--one">{{ page.title }}</h1>
<h1 class="heading heading--one" dir="auto">{{ page.title }}</h1>

{% if page.table_of_contents %}
<div class="toc">
Expand All @@ -28,7 +28,7 @@ <h2 class="toc__heading">{% trans 'In this section' %}</h2>
<ul>
{% for child in children %}
<li>
<a href="{% pageurl child %}">{{ child.title }}</a>
<a href="{% pageurl child %}" dir="auto">{{ child.title }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -38,7 +38,7 @@ <h2 class="toc__heading">{% trans 'In this section' %}</h2>
{% endwith %}


<p class="byline">
<p dir="auto" class="byline">
<em>{% blocktrans with last_updated=page.last_published_at|date:"F j, Y" trimmed %}Last updated: {{ last_updated }}{% endblocktrans %}</em>
</p>

Expand Down
2 changes: 1 addition & 1 deletion apps/core/templates/core/home_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block content %}

<h1 class="heading heading--display">{{ page.title }}</h1>
<h1 class="heading heading--display" dir="auto">{{ page.title }}</h1>

<div class="introduction">
{{ page.introduction|richtext }}
Expand Down
2 changes: 1 addition & 1 deletion apps/core/templates/core/svg/explanation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading