Почему тег translate не работает вне блока?

У меня есть базовый шаблон...

{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
{# Translators: The title of the website #}
{% translate "FilFak" as the_title %}
{# Translators: The description and subtitle of the website #}
{% translate "Appointments, tasks and much more" as the_description %}
<meta name="title" content="{{ the_title }}" />
<meta name="description" content="{{ the_description }}" />
<meta property="og:title" content="{{ the_title }}" />
<meta property="og:description" content="{{ the_description }}" />
<title>{% block title %}{{ the_title }}{% endblock title %}</title>
<link href="{% static 'css/style.css' %}" rel="stylesheet" type="text/css" />
</head>
<body>
<header>
<h1><a href="{% url 'index' %}">{{ the_title }}</a></h1>
<p>{{ the_description }}</p>
</header>
<main>
{% block content %}

{% endblock content %}
</main>
<footer>
{% include "courses/lang_form.html" %}
</footer>
</body>
</html>

И у меня есть несколько шаблонов, расширяющих базовые шаблоны. Вот пример.

{% extends "courses/base.html" %}
{% load i18n %}

{% translate "List of professors" as page_title %}
{% block title %}{{ page_title }} | {{ block.super }}{% endblock title %}

{% block content %}
{% for professor in professor_list %}
<article>
<header>
<h3 class="title"><a href="{% url 'professor_details' professor.slug %}">{% if professor.title %}{{ professor.title }} {% endif %}{{ professor.name }}</a></h3>
</header>
<p><span class="details">{% blocktranslate count num_of_courses=professor.courses.all|length %}1 course{% plural %}{{ num_of_courses }} courses{% endblocktranslate %}</span></p>
</article>
{% endfor %}
{% endblock content %}

Почему заголовок списка профессоров отображается как "| FilFak", а не "Список профессоров | FilFak"? Я перевел строки и скомпилировал сообщения.

Вернуться на верх