diff --git a/djangoproject/templates/foundation/coreawardcohort_list.html b/djangoproject/templates/foundation/coreawardcohort_list.html
index af2b9ed01..66979a888 100644
--- a/djangoproject/templates/foundation/coreawardcohort_list.html
+++ b/djangoproject/templates/foundation/coreawardcohort_list.html
@@ -1,17 +1,19 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Django Core Developers{% endblock %}
-{% block og_description %}Former Django Core Team dissolved on March 12, 2020.{% endblock %}
+{% block og_title %}{% translate "Django Core Developers" %}{% endblock %}
+{% block og_description %}{% translate "Former Django Core Team dissolved on March 12, 2020." %}{% endblock %}
{% block content %}
-
Django Core Developers
+ {% translate "Django Core Developers" %}
- The title “Django Core Developer” is awarded to individuals
- who have made significant contributions, over an extended period of time,
- to Django or to major parts of its ecosystem. The title is awarded by the
- Board of Directors of the Django Software Foundation.
- A list of recipients is below.
+ {% blocktranslate trimmed %}
+ The title “Django Core Developer” is awarded to individuals
+ who have made significant contributions, over an extended period of time,
+ to Django or to major parts of its ecosystem. The title is awarded by the
+ Board of Directors of the Django Software Foundation.
+ A list of recipients is below.{% endblocktranslate %}
{% for cohort in object_list %}
{{ cohort }}
diff --git a/djangoproject/templates/foundation/meeting_archive.html b/djangoproject/templates/foundation/meeting_archive.html
index 367842b21..ef724d229 100644
--- a/djangoproject/templates/foundation/meeting_archive.html
+++ b/djangoproject/templates/foundation/meeting_archive.html
@@ -1,16 +1,17 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Meeting minutes archive{% endblock %}
-{% block og_description %}View meeting minutes{% endblock %}
+{% block og_title %}{% translate "Meeting minutes archive" %}{% endblock %}
+{% block og_description %}{% translate "View meeting minutes" %}{% endblock %}
{% block head_extra %}
{% endblock %}
{% block content %}
- Meeting minutes archive
+ {% translate "Meeting minutes archive" %}
- Select a year to view meeting minutes:
+ {% translate "Select a year to view meeting minutes:" %}
{% for year in date_list %}
diff --git a/djangoproject/templates/foundation/meeting_archive_day.html b/djangoproject/templates/foundation/meeting_archive_day.html
index 1f7ef7be5..0cdc2ce43 100644
--- a/djangoproject/templates/foundation/meeting_archive_day.html
+++ b/djangoproject/templates/foundation/meeting_archive_day.html
@@ -1,10 +1,13 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Meeting minutes archive{% endblock %}
-{% block og_description %}View meeting minutes for {{ day|date:"F j, Y" }}{% endblock %}
+{% block og_title %}{% translate "Meeting minutes archive" %}{% endblock %}
+{% block og_description %}{% blocktranslate trimmed with day=day|date:"DATE_FORMAT" %}
+ View meeting minutes for {{ day }}{% endblocktranslate %}{% endblock %}
{% block content %}
- Meeting minutes archive: {{ day|date:"F j, Y" }}
+ {% blocktranslate trimmed with day=day|date:"DATE_FORMAT" %}
+ Meeting minutes archive: {{ day }}{% endblocktranslate %}
{% for meeting in object_list %}
diff --git a/djangoproject/templates/foundation/meeting_archive_month.html b/djangoproject/templates/foundation/meeting_archive_month.html
index 9ef3a46e4..9c8ac61c3 100644
--- a/djangoproject/templates/foundation/meeting_archive_month.html
+++ b/djangoproject/templates/foundation/meeting_archive_month.html
@@ -1,10 +1,11 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Meeting minutes archive{% endblock %}
-{% block og_description %}View meeting minutes for {{ month|date:"F, Y" }}{% endblock %}
+{% block og_title %}{% translate "Meeting minutes archive" %}{% endblock %}
+{% block og_description %}{% blocktranslate with month=month|date:"F, Y" %}View meeting minutes for {{ month }}{% endblocktranslate %}{% endblock %}
{% block content %}
- Meeting minutes archive: {{ month|date:"F, Y" }}
+ {% blocktranslate with month=month|date:"F, Y" %}Meeting minutes archive: {{ month }}{% endblocktranslate %}
{% for meeting in object_list %}
diff --git a/djangoproject/templates/foundation/meeting_archive_year.html b/djangoproject/templates/foundation/meeting_archive_year.html
index e38e10ab1..b869455fa 100644
--- a/djangoproject/templates/foundation/meeting_archive_year.html
+++ b/djangoproject/templates/foundation/meeting_archive_year.html
@@ -1,10 +1,11 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Meeting minutes archive{% endblock %}
-{% block og_description %}View meeting minutes for {{ year|date:"Y" }}{% endblock %}
+{% block og_title %}{% translate "Meeting minutes archive" %}{% endblock %}
+{% block og_description %}{% blocktranslate with year=year|date:"Y" %}View meeting minutes for {{ year }}{% endblocktranslate %}{% endblock %}
{% block content %}
- Meeting minutes archive: {{ year|date:"Y" }}
+ {% blocktranslate with year=year|date:"Y" %}Meeting minutes archive: {{ year }}{% endblocktranslate %}
{% for meeting in object_list %}
diff --git a/djangoproject/templates/foundation/meeting_detail.html b/djangoproject/templates/foundation/meeting_detail.html
index 5bb861e23..8f767b8e8 100644
--- a/djangoproject/templates/foundation/meeting_detail.html
+++ b/djangoproject/templates/foundation/meeting_detail.html
@@ -1,16 +1,21 @@
{% extends "base_foundation.html" %}
+{% load i18n %}
-{% block og_title %}Meeting minutes: {{ meeting }}{% endblock %}
-{% block og_description %}Meeting minutes for {{ meeting }}{% endblock %}
+{% block og_title %}{% blocktranslate %}Meeting minutes: {{ meeting }}{% endblocktranslate %}{% endblock %}
+{% block og_description %}{% blocktranslate %}Meeting minutes for {{ meeting }}{% endblocktranslate %}{% endblock %}
{% block content %}
{% load djmoney %}
{{ meeting }}
- The meeting was led by {{ meeting.leader.account.get_full_name }}.
+
+ {% blocktranslate trimmed with name=meeting.leader.account.get_full_name %}
+ The meeting was led by {{ name }}.
+ {% endblocktranslate %}
+
- Board members in attendance were:
+ {% translate "Board members in attendance were:" %}
{% for attendee in meeting.board_attendees.all %}
@@ -19,7 +24,7 @@ {{ meeting }}
{% if meeting.non_board_attendees.all %}
- Also in attendance were:
+ {% translate "Also in attendance were:" %}
{% for attendee in meeting.non_board_attendees.all %}
@@ -28,19 +33,19 @@ {{ meeting }}
{% endif %}
- Finances
+ {% translate "Finances" %}
- Balance
+ {% translate "Balance" %}
{{ meeting.treasurer_balance.currency.code }} {% money_localize meeting.treasurer_balance %}
{% if meeting.treasurer_report %}
- Treasurer’s report
+ {% translate "Treasurer’s report" %}
{{ meeting.treasurer_report_html|safe }}
{% endif %}
{% if meeting.grants_approved.all %}
- Grants approved
+ {% translate "Grants approved" %}
{% for grant in meeting.grants_approved.all %}
@@ -50,7 +55,7 @@ Grants approved
{% endif %}
{% if meeting.individual_members_approved.all %}
- Individual members approved
+ {% translate "Individual members approved" %}
{% for member in meeting.individual_members_approved.all %}
@@ -60,7 +65,7 @@ Individual members approved
{% endif %}
{% if meeting.corporate_members_approved.all %}
- Corporate members approved
+ {% translate "Corporate members approved" %}
{% for member in meeting.corporate_members_approved.all %}
@@ -70,27 +75,27 @@ Corporate members approved
{% endif %}
{% if ongoing_business %}
- Ongoing business
+ {% translate "Ongoing business" %}
{% for business in ongoing_business %}
- {{ business.title }}
+ {{ business.title }}
{{ business.body_html|safe }}
{% endfor %}
{% endif %}
{% if new_business %}
- New business
+ {% translate "New business" %}
{% for business in new_business %}
- {{ business.title }}
+ {{ business.title }}
{{ business.body_html|safe }}
{% endfor %}
{% endif %}
{% if meeting.action_items.all %}
- Action items
+ {% translate "Action items" %}
{% for action_item in meeting.action_items.all %}
diff --git a/foundation/admin.py b/foundation/admin.py
index 9ad01e77a..1c905040e 100644
--- a/foundation/admin.py
+++ b/foundation/admin.py
@@ -1,5 +1,6 @@
from django.contrib import admin
from django.utils.text import slugify
+from django.utils.translation import gettext as _
from . import models
@@ -87,7 +88,7 @@ class MeetingAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("title",)}
def get_changeform_initial_data(self, request):
- title = "DSF Board monthly meeting"
+ title = _("DSF Board monthly meeting")
return {
"title": title,
"slug": slugify(title),
diff --git a/foundation/feeds.py b/foundation/feeds.py
index 59706f3bc..072a9c8e0 100644
--- a/foundation/feeds.py
+++ b/foundation/feeds.py
@@ -2,14 +2,15 @@
from django.contrib.syndication.views import Feed
from django.utils.timezone import make_aware
+from django.utils.translation import gettext_lazy as _
from .models import Meeting
class FoundationMinutesFeed(Feed):
- title = "The DSF meeting minutes"
+ title = _("The DSF meeting minutes")
link = "https://www.djangoproject.com/foundation/minutes/"
- description = "The meeting minutes of the Django Software Foundation's board."
+ description = _("The meeting minutes of the Django Software Foundation's board.")
def items(self):
return Meeting.objects.order_by("-date")[:10]
@@ -18,7 +19,7 @@ def item_pubdate(self, item):
return make_aware(datetime.combine(item.date, time.min))
def item_author_name(self, item):
- return "DSF Board"
+ return _("DSF Board")
def item_title(self, item):
return str(item)
diff --git a/foundation/models.py b/foundation/models.py
index ddbb45171..598ee2116 100644
--- a/foundation/models.py
+++ b/foundation/models.py
@@ -4,6 +4,7 @@
from django.db import models
from django.urls import reverse
from django.utils.dateformat import format as date_format
+from django.utils.translation import gettext_lazy as _
from djmoney.models.fields import MoneyField
from djmoney.settings import CURRENCIES
from docutils.core import publish_parts
@@ -61,8 +62,8 @@ class NonBoardAttendee(models.Model):
role = models.CharField(max_length=100)
class Meta:
- verbose_name = "Non-board attendee"
- verbose_name_plural = "Non-board attendees"
+ verbose_name = _("Non-board attendee")
+ verbose_name_plural = _("Non-board attendees")
def __str__(self):
return f"{self.name} ({self.role})"
@@ -195,8 +196,8 @@ class Business(models.Model):
ONGOING = "ongoing"
TYPE_CHOICES = (
- (NEW, "New"),
- (ONGOING, "Ongoing"),
+ (NEW, _("New")),
+ (ONGOING, _("Ongoing")),
)
title = models.CharField(max_length=255)
@@ -209,7 +210,7 @@ class Business(models.Model):
class Meta:
ordering = ("title",)
- verbose_name_plural = "Business"
+ verbose_name_plural = _("Business")
def __str__(self):
return self.title
@@ -248,11 +249,11 @@ class CoreAwardCohort(models.Model):
name = models.CharField(
max_length=255,
unique=True,
- help_text="Name for the group being inducted, e.g. 'Q1 2021'",
+ help_text=_("Name for the group being inducted, e.g. 'Q1 2021'"),
)
description = models.TextField(blank=True)
cohort_date = models.DateField(
- help_text="Date this cohort was approved by the DSF Board",
+ help_text=_("Date this cohort was approved by the DSF Board"),
)
def __str__(self):
@@ -268,16 +269,16 @@ class CoreAward(models.Model):
on_delete=models.CASCADE,
)
recipient = models.CharField(
- help_text="Recipient's name", max_length=1023, unique=True
+ help_text=_("Recipient's name"), max_length=1023, unique=True
)
link = models.URLField(
blank=True,
null=True,
- help_text="Optional link for this recipient",
+ help_text=_("Optional link for this recipient"),
)
description = models.TextField(
blank=True,
- help_text=(
+ help_text=_(
"Optional one-paragraph description/bio of why this person "
"received the award"
),