Skip to content

Commit 3480243

Browse files
authored
[members] Marked all user-facing strings for translation
Refs #1648
1 parent a8f13c0 commit 3480243

11 files changed

+136
-114
lines changed

djangoproject/templates/members/corporate_member_badges.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "base_foundation.html" %}
2-
{% load static %}
2+
{% load i18n static %}
33

44
{% block head_extra %}
55
<style type="text/css">
@@ -28,9 +28,12 @@
2828
{% endblock head_extra %}
2929

3030
{% block content %}
31-
<h1>Corporate member badges</h1>
31+
<h1>{% translate "Corporate member badges" %}</h1>
3232
<p>
33-
<a href="/foundation/corporate-membership/">Corporate members</a> of the Django Software Foundation may display these badges on their site to show their support.
33+
{% blocktranslate trimmed %}
34+
<a href="/foundation/corporate-membership/">Corporate members</a> of the Django Software Foundation may display
35+
these badges on their site to show their support.
36+
{% endblocktranslate %}
3437
</p>
3538
{% for level, variants in badges.items %}
3639
<h3>{{ level|title }}</h3>

djangoproject/templates/members/corporate_member_renewal_email.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{% load i18n %}{% spaceless %}
2+
{% blocktranslate %}
13
Hi {{ contact_name }},
24

35
The Django Software Foundation membership for {{ member_name }} expires
@@ -11,3 +13,5 @@ Thank you for your support!
1113

1214
p.s. If you decide not to renew, please reply to let us know and we'll mark
1315
your membership as inactive.
16+
{% endblocktranslate %}
17+
{% endspaceless %}

djangoproject/templates/members/corporate_members_join_thanks.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
{% load i18n %}
33

44
{% block content %}
5-
<h1>{% trans "Corporate membership application submitted." %}</h1>
5+
<h1>{% translate "Corporate membership application submitted." %}</h1>
66
<p>
7-
{% blocktrans %}
7+
{% blocktranslate trimmed %}
88
Thanks! Your application is being reviewed, and we'll follow up a
99
response from the board after our next monthly meeting.
10-
{% endblocktrans %}
10+
{% endblocktranslate %}
1111
</p>
1212
{% endblock %}

djangoproject/templates/members/corporatemember_form.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{% load i18n %}
33

44
{% block content %}
5-
<h1>{% trans "Become a DSF corporate member" %}</h1>
5+
<h1>{% translate "Become a DSF corporate member" %}</h1>
66
<p>
7-
{% blocktrans %}
7+
{% blocktranslate trimmed %}
88
Provide us with a few details and we'll start onboarding your
99
organization!
10-
{% endblocktrans %}
10+
{% endblocktranslate %}
1111
</p>
1212
<form class="form-input corporate-membership-join-form" method="post" action="."
1313
enctype="multipart/form-data">
@@ -23,6 +23,6 @@ <h1>{% trans "Become a DSF corporate member" %}</h1>
2323
{% if field.help_text %}<p class="footnote">{{ field.help_text|safe }}</p>{% endif %}
2424
</div>
2525
{% endfor %}
26-
<input class="cta" type="submit" value="Send →">
26+
<input class="cta" type="submit" value="{% translate "Send " %}">
2727
</form>
2828
{% endblock %}

djangoproject/templates/members/corporatemember_list.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{% extends "base_foundation.html" %}
22
{% load humanize i18n %}
33

4-
{% block og_title %}Corporate members{% endblock %}
5-
{% block og_description %}The following organizations are corporate members of the Django Software Foundation.{% endblock %}
4+
{% block og_title %}{% translate "Corporate members" %}{% endblock %}
5+
{% block og_description %}{% translate "The following organizations are corporate members of the Django Software Foundation." %}{% endblock %}
66

77
{% block content %}
8-
<h1>{% trans "Corporate members" %}</h1>
8+
<h1>{% translate "Corporate members" %}</h1>
99
<p>
10-
{% blocktrans %}
10+
{% blocktranslate trimmed %}
1111
The following organizations are corporate members of the Django Software
1212
Foundation. If you are interested in becoming a corporate member of the
1313
DSF, you can find out more on our <a href="/foundation/corporate-membership/">
1414
corporate membership page</a>.
15-
{% endblocktrans %}
15+
{% endblocktranslate %}
1616
</p>
1717

1818
{% if members.diamond %}
19-
<h3>Diamond Corporate Members (${{ corporate_membership_amounts.diamond|intcomma }}+)</h3>
19+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.diamond|intcomma %}
20+
Diamond Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
2021
<ul class="corporate-members">
2122
{% for obj in members.diamond %}
2223
{% include "members/includes/_member_with_logo.html" %}
@@ -25,7 +26,8 @@ <h3>Diamond Corporate Members (${{ corporate_membership_amounts.diamond|intcomma
2526
{% endif %}
2627

2728
{% if members.platinum %}
28-
<h3>Platinum Corporate Members (${{ corporate_membership_amounts.platinum|intcomma }}+)</h3>
29+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.platinum|intcomma %}
30+
Platinum Corporate Members" %} (${{ amount }}+){% endblocktranslate %}</h3>
2931
<ul class="corporate-members">
3032
{% for obj in members.platinum %}
3133
{% include "members/includes/_member_with_logo.html" %}
@@ -34,7 +36,8 @@ <h3>Platinum Corporate Members (${{ corporate_membership_amounts.platinum|intcom
3436
{% endif %}
3537

3638
{% if members.gold %}
37-
<h3>Gold Corporate Members (${{ corporate_membership_amounts.gold|intcomma }}+)</h3>
39+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.gold|intcomma %}
40+
Gold Corporate Members" %} (${{ amount }}+){% endblocktranslate %}</h3>
3841
<ul class="corporate-members">
3942
{% for obj in members.gold %}
4043
{% include "members/includes/_member_with_logo.html" %}
@@ -43,7 +46,8 @@ <h3>Gold Corporate Members (${{ corporate_membership_amounts.gold|intcomma }}+)<
4346
{% endif %}
4447

4548
{% if members.silver %}
46-
<h3>Silver Corporate Members (${{ corporate_membership_amounts.silver|intcomma }}+)</h3>
49+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.silver|intcomma %}
50+
Silver Corporate Members" %} (${{ amount }}+){% endblocktranslate %}</h3>
4751
<ul class="corporate-members">
4852
{% for obj in members.silver %}
4953
{% include "members/includes/_member_with_logo.html" %}
@@ -52,7 +56,8 @@ <h3>Silver Corporate Members (${{ corporate_membership_amounts.silver|intcomma }
5256
{% endif %}
5357

5458
{% if members.bronze %}
55-
<h3>Bronze Corporate Members (${{ corporate_membership_amounts.bronze|intcomma }}+)</h3>
59+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.bronze|intcomma %}
60+
Bronze Corporate Members" %} (${{ amount }}+){% endblocktranslate %}</h3>
5661
<ul class="corporate-members">
5762
{% for obj in members.bronze %}
5863
{% include "members/includes/_member_with_logo.html" %}

djangoproject/templates/members/individualmember_list.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,77 @@
22
{% load i18n %}
33

44
{% block content %}
5-
<h1>{% trans "Individual members" %}</h1>
5+
<h1>{% translate "Individual members" %}</h1>
66
<p>
7-
{% blocktrans %}
7+
{% blocktranslate trimmed %}
88
Individual Members are appointed by the DSF in recognition of their contribution to the DSF's mission of advancing and promoting Django, protecting the framework's long-term viability, and advancing the state of the art in web development.
9-
{% endblocktrans %}
9+
{% endblocktranslate %}
1010
</p>
1111

1212
<p>
13-
{% blocktrans %}
13+
{% blocktranslate trimmed %}
1414
Contribution to the DSF's mission takes many forms.
1515
Here are some non-exhaustive examples of the categories of work that might qualify:
16-
{% endblocktrans %}
16+
{% endblocktranslate %}
1717
</p>
1818

1919
<ul>
2020
<li>
21-
{% blocktrans %}
21+
{% blocktranslate trimmed %}
2222
Contributing code, documentation, or tests to Django or to major third-party packages in the Django ecosystem.
23-
{% endblocktrans %}
23+
{% endblocktranslate %}
2424
</li>
2525
<li>
26-
{% blocktrans %}
26+
{% blocktranslate trimmed %}
2727
Reviewing pull requests or triaging tickets on Django or a third-party app.
28-
{% endblocktrans %}
28+
{% endblocktranslate %}
2929
</li>
3030
<li>
31-
{% blocktrans %}
31+
{% blocktranslate trimmed %}
3232
Creating learning resources (blogs, videos, etc.) for people to learn Django.
33-
{% endblocktrans %}
33+
{% endblocktranslate %}
3434
</li>
3535
<li>
36-
{% blocktrans %}
36+
{% blocktranslate trimmed %}
3737
Contributing to discussions in community areas such as the <a href="https://forum.djangoproject.com/">Django Forum</a> or <a href="https://discord.com/invite/xcRH6mN4fa">Discord</a>.
38-
{% endblocktrans %}
38+
{% endblocktranslate %}
3939
</li>
4040
<li>
41-
{% blocktrans %}
41+
{% blocktranslate trimmed %}
4242
Being part of the organizing team for a Django community event.
43-
{% endblocktrans %}
43+
{% endblocktranslate %}
4444
</li>
4545
<li>
46-
{% blocktrans %}
46+
{% blocktranslate trimmed %}
4747
Serving on a <a href="https://github.com/django/dsf-working-groups">DSF Working Group</a>.
48-
{% endblocktrans %}
48+
{% endblocktranslate %}
4949
</li>
5050
</ul>
5151

5252
<p>
53-
{% blocktrans %}
53+
{% blocktranslate trimmed %}
5454
For more information about membership, see <a href="faq/">the DSF membership FAQ</a>.
55-
{% endblocktrans %}
55+
{% endblocktranslate %}
5656
</p>
5757

5858
<p>
59-
{% blocktrans %}
59+
{% blocktranslate trimmed %}
6060
If you would like to apply for Individual Membership, please <a href="https://docs.google.com/forms/d/e/1FAIpQLSd5lbWxAO-sylEEjHVKBNIpmHlhdJRf0_LCo8glnLUWd-Q2Sw/viewform?usp=sf_link">fill out this form</a>.
6161
If you are unsure if you meet the criteria, but you would like to be a member, please apply anyway!
6262
You can also nominate others using the same form if you know someone who should be considered.
63-
{% endblocktrans %}
63+
{% endblocktranslate %}
6464
</p>
6565

6666
<p>
67-
{% blocktrans %}
67+
{% blocktranslate trimmed %}
6868
As a member of the DSF, you will be recognized for your contributions to the community. Your name will appear below and you'll be added to the DSF Members Mailing list. You will also be eligible to vote for the DSF Board and Steering Council.
69-
{% endblocktrans %}
69+
{% endblocktranslate %}
7070
</p>
7171

7272
<p>
73-
{% blocktrans %}
73+
{% blocktranslate trimmed %}
7474
The following are Individual Members of the Django Software Foundation.
75-
{% endblocktrans %}
75+
{% endblocktranslate %}
7676
</p>
7777

7878
<ul>
@@ -82,8 +82,8 @@ <h1>{% trans "Individual members" %}</h1>
8282
</ul>
8383

8484
{% if former_members %}
85-
<h2>{% trans "Former members" %}</h2>
86-
<p>{% trans "The following are former Individual Members of the DSF." %}</p>
85+
<h2>{% translate "Former members" %}</h2>
86+
<p>{% translate "The following are former Individual Members of the DSF." %}</p>
8787

8888
<ul>
8989
{% for member in former_members %}

djangoproject/templates/members/team_list.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{% extends "base_foundation.html" %}
2+
{% load i18n %}
23

3-
{% block og_title %}Meet the Teams | Django Software Foundation{% endblock %}
4+
{% block og_title %}{% translate "Meet the Teams | Django Software Foundation" %}{% endblock %}
45
{% block og_description %}{% spaceless %}
5-
Get to know the teams behind the Django Software Foundation,
6-
including the Steering Council and various committees. Learn about
7-
their roles and responsibilities in advancing the development and
8-
adoption of the Django web framework.
6+
{% blocktranslate trimmed %}
7+
Get to know the teams behind the Django Software Foundation,
8+
including the Steering Council and various committees. Learn about
9+
their roles and responsibilities in advancing the development and
10+
adoption of the Django web framework.
11+
{% endblocktranslate %}
912
{% endspaceless %}{% endblock %}
1013

1114
{% block content %}
1215

13-
<h2>Teams</h2>
14-
<p>Teams indicate who is actively contributing in certain areas.</p>
16+
<h2>{% translate "Teams" %}</h2>
17+
<p>{% translate "Teams indicate who is actively contributing in certain areas." %}</p>
1518

1619
{% for team in teams %}
1720
<div class="section">

members/admin.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django.templatetags.static import static
55
from django.utils.formats import localize
66
from django.utils.html import format_html
7+
from django.utils.translation import gettext_lazy as _
78

89
from members.models import CorporateMember, IndividualMember, Invoice, Team
910

@@ -29,14 +30,14 @@ class StatusFilter(admin.SimpleListFilter):
2930
Display only active members in the changelist page, by default.
3031
"""
3132

32-
title = "Status"
33+
title = _("Status")
3334
parameter_name = "status"
3435

3536
def lookups(self, request, model_admin):
3637
return (
37-
(None, "Active"),
38-
("inactive", "Inactive"),
39-
("all", "All"),
38+
(None, _("Active")),
39+
("inactive", _("Inactive")),
40+
("all", _("All")),
4041
)
4142

4243
def choices(self, cl):
@@ -76,9 +77,10 @@ def get_queryset(self, request):
7677

7778
def renewal_link(self, obj):
7879
return format_html(
79-
'<a href="{}"><img src="{}" alt="renewal link" />',
80+
'<a href="{}"><img src="{}" alt="{}" />',
8081
obj.get_renewal_link(),
8182
static("admin/img/icon-changelink.svg"),
83+
_("renewal link"),
8284
)
8385

8486
def membership_expires(self, obj):

0 commit comments

Comments
 (0)