Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate templates #288

Merged
merged 3 commits into from
Feb 24, 2023
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
7 changes: 4 additions & 3 deletions myhpi/core/templates/core/information_page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load core_extras %}
{% load i18n %}

{% block content %}
{% with page.body|markdown as parsed_md %}
Expand All @@ -15,20 +16,20 @@ <h1 class="page-title">
<div class="col-lg-3">
<div class="side-panel-container">
<aside class="side-panel border-accent">
<h1 class="toc-title">Zuletzt bearbeitet</h1>
<h1 class="toc-title">{% translate "Last edited" %}</h1>
{{ page.last_published_at|date:"d.m.Y, H:i" }}
{% if page.author_visible %}
<i>von</i>
{{ page.last_edited_by }}
{% endif %}
</aside>
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="toc-title">Inhaltsverzeichnis</h1>
<h1 class="toc-title">{% translate "Table of contents" %}</h1>
{{ parsed_md.1 }}
</aside>
{% if page.attachments.all %}
<aside class="side-panel border-accent toc-container d-print-none">
<h1 class="toc-title">Attachments</h1>
<h1 class="toc-title">{% translate "Attachments" %}</h1>
<ul>
{% for attachment in page.attachments.all %}
<li>
Expand Down
25 changes: 13 additions & 12 deletions myhpi/core/templates/core/minutes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% load static %}
{% load core_extras %}
{% load minutes_tags %}
{% load i18n %}

{% block content %}
<div class="row minutes-container">
Expand All @@ -13,40 +14,40 @@ <h1>{{ page.title }}</h1>
{{ parsed_md.0 }}
</div>
<div class="col-3 minutes-meta">
<h4>Date</h4>
<h4>{% translate "Date" %}</h4>
<p>{{ page.date }}</p>
<h4>Moderator</h4>
<h4>{% translate "Moderator" %}</h4>
<p>{{ page.moderator.get_full_name }}</p>
<h4>Minutes taker</h4>
<h4>{% translate "Minutes taker" %}</h4>
<p>{{ page.author.get_full_name }}</p>
<h4>Participants</h4>
<h4>{% translate "Participants" %}</h4>
<ul>
{% for participant in page.participants.all %}
<li>{{ participant.get_full_name }}</li>
{% endfor %}
</ul>
<h4>Guests</h4>
<h4>{% translate "Guests" %}</h4>
{% if page.guests %}
<ul>
{% for guest in page.guests %}
<li>{{ guest }}</li>
{% endfor %}
</ul>
{% else %}
<i>No guests</i>
<i>{% translate "No guests" %}</i>
{% endif %}
<h4>Labels</h4>
<h4>{% translate "Labels" %}</h4>
{% if page.labels.all %}
<p>
{% include "core/label.html" with minutes=page %}
</p>
{% else %}
<i>No labels</i>
<i>{% translate "No labels"%}</i>
{% endif %}
<h4 class="d-print-none">Table of contents</h4>
<h4 class="d-print-none">{% translate "Table of contents" %}</h4>
{{ parsed_md.1 }}
{% if page.attachments.all %}
<h4 class="d-print-none">Attachments</h4>
<h4 class="d-print-none">{% translate "Attachments" %}</h4>
<ul>
{% for attachment in page.attachments.all %}
<li>
Expand All @@ -61,13 +62,13 @@ <h4 class="d-print-none">Attachments</h4>
<div class="col-6">
{% prev_minutes page as prev %}
{% if prev %}
<a href="{{ prev.url }}">< Previous minutes</a>
<a href="{{ prev.url }}">< {% translate "Previous minutes" %}</a>
{% endif %}
</div>
<div class="col-6">
{% next_minutes page as next %}
{% if next %}
<a href="{{ next.url }}">Next minutes ></a>
<a href="{{ next.url }}"> {% translate "Next minutes" %} ></a>
{% endif %}
</div>
{% endwith %}
Expand Down
3 changes: 2 additions & 1 deletion myhpi/core/templates/core/minutes_list.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% extends "base.html" %}
{% load wagtailcore_tags %}
{% load i18n %}

{% block content %}
<h1>{{ page.title }}</h1>
Expand All @@ -11,7 +12,7 @@ <h3 id="year{{ year }}">{{ year }}</h3>
<td><a href="{% pageurl minute %}">{{ minute.date|date:"d.m.Y" }}</a></td>
<td>
{% if not minute.live %}
<span title="Draft" aria-hidden="true">⚠️</span>
<span title={% translate "Draft" %} aria-hidden="true">⚠️</span>
{% endif %}
</td>
<td>
Expand Down
Loading