Skip to content

Commit a41119e

Browse files
authored
[fundraising] Marked all user-facing strings for translation
Refs #1648
1 parent 34e94f0 commit a41119e

14 files changed

+438
-265
lines changed
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
Hi {{ donation.donor.name_with_fallback }},
1+
{% load i18n %}{% spaceless %}{% url 'fundraising:manage-donations' donation.donor.pk as manage_url %}
2+
{% blocktranslate with name=donation.donor.name_with_fallback %}
3+
Hi {{ name }},
24

3-
This is to let you know that payment for your recurring donation to the Django Software Foundation has failed. This might be because your payment card has expired.
5+
This is to let you know that payment for your recurring donation to the Django Software Foundation has failed.
6+
This might be because your payment card has expired.
47

5-
Please go to {% url 'fundraising:manage-donations' donation.donor.pk %} to add a new card. We won't be able to take any payments in the mean time.
8+
Please go to {{ manage_url }} to add a new card. We won't be able to take any payments in the mean time.
69

710
Thanks very much for your support.
811

912
Regards,
1013
Django Software Foundation
14+
{% endblocktranslate %}
15+
{% endspaceless %}
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
Hi {{ donation.donor.name_with_fallback }},
1+
{% load i18n %}{% spaceless %}{% url 'fundraising:index' as fundraising_url %}
2+
{% blocktranslate with name=donation.donor.name_with_fallback url=fundraising_url %}
3+
Hi {{ name }},
24

35
This is to let you know that your recurring payment to the Django Software
46
Foundation has been cancelled. No further payments will be made.
57

68
If you didn't intend to do this, please go back to the fundraising page and
79
recreate your payment subscription:
8-
{% url 'fundraising:index' %}
9-
10+
{{ fundraising_url }}
1011
Thanks very much for your support.
1112

1213
Regards,
1314
Django Software Foundation
15+
{% endblocktranslate %}
16+
{% endspaceless %}
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
Hello!
1+
{% load i18n %}{% spaceless %}{% url 'fundraising:manage-donations' donation.donor.pk as manage_url %}{% blocktranslate with manage_url=manage_url %}
2+
Hello!
23

3-
Thank you for making a donation to the Django Software Foundation.
4+
Thank you for making a donation to the Django Software Foundation.
45

5-
Your support is invaluable to continue the rapid development of Django and helps the Django Fellowship program in particular.
6+
Your support is invaluable to continue the rapid development of Django and helps the Django Fellowship program in particular.
67

7-
If you want to change information about your donation, you can do so by accessing the link below:
8-
{% url 'fundraising:manage-donations' donation.donor.pk %}
8+
If you want to change information about your donation, you can do so by accessing the link below:
99

10-
Best regards,
11-
Django Software Foundation
10+
{{ manage_url }}
11+
12+
Best regards,
13+
Django Software Foundation
14+
{% endblocktranslate %}
15+
{% endspaceless %}

djangoproject/templates/fundraising/includes/display_django_heroes.html

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
{% load humanize %}
1+
{% load humanize i18n %}
22
<div class="heroes">
33
{% if corporate_members.diamond %}
4-
<h3>Diamond Corporate Members (${{ corporate_membership_amounts.diamond|intcomma }}+)</h3>
4+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.diamond|intcomma %}
5+
Diamond Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
56
<div>
67
{% for obj in corporate_members.diamond %}
78
{% include "fundraising/includes/_hero_with_logo.html" %}
@@ -10,7 +11,8 @@ <h3>Diamond Corporate Members (${{ corporate_membership_amounts.diamond|intcomma
1011
{% endif %}
1112

1213
{% if corporate_members.platinum %}
13-
<h3>Platinum Corporate Members (${{ corporate_membership_amounts.platinum|intcomma }}+)</h3>
14+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.platinum|intcomma %}
15+
Platinum Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
1416
<div>
1517
{% for obj in corporate_members.platinum %}
1618
{% include "fundraising/includes/_hero_with_logo.html" %}
@@ -19,7 +21,8 @@ <h3>Platinum Corporate Members (${{ corporate_membership_amounts.platinum|intcom
1921
{% endif %}
2022

2123
{% if corporate_members.gold %}
22-
<h3>Gold Corporate Members (${{ corporate_membership_amounts.gold|intcomma }}+)</h3>
24+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.gold|intcomma %}
25+
Gold Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
2326
<div>
2427
{% for obj in corporate_members.gold %}
2528
{% include "fundraising/includes/_hero_with_logo.html" %}
@@ -28,7 +31,8 @@ <h3>Gold Corporate Members (${{ corporate_membership_amounts.gold|intcomma }}+)<
2831
{% endif %}
2932

3033
{% if corporate_members.silver %}
31-
<h3>Silver Corporate Members (${{ corporate_membership_amounts.silver|intcomma }}+)</h3>
34+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.silver|intcomma %}
35+
Silver Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
3236
<div>
3337
{% for obj in corporate_members.silver %}
3438
{% include "fundraising/includes/_hero_with_logo.html" %}
@@ -37,16 +41,17 @@ <h3>Silver Corporate Members (${{ corporate_membership_amounts.silver|intcomma }
3741
{% endif %}
3842

3943
{% if corporate_members.bronze %}
40-
<h3>Bronze Corporate Members (${{ corporate_membership_amounts.bronze|intcomma }}+)</h3>
44+
<h3>{% blocktranslate trimmed with amount=corporate_membership_amounts.bronze|intcomma %}
45+
Bronze Corporate Members (${{ amount }}+){% endblocktranslate %}</h3>
4146
<div>
4247
{% for obj in corporate_members.bronze %}
4348
{% include "fundraising/includes/_hero_with_logo.html" %}
4449
{% endfor %}
4550
</div>
4651
{% endif %}
4752

48-
<h3><a id="in-kind-donors" href="#in-kind-donors">In-kind donors</a></h3>
49-
<p>These donors help with significant non-cash contributions.</p>
53+
<h3><a id="in-kind-donors" href="#in-kind-donors">{% translate "In-kind donors" %}</a></h3>
54+
<p>{% translate "These donors help with significant non-cash contributions." %}</p>
5055
<div>
5156
{% with show_description=True %}
5257
{% for obj in inkind_donors %}
@@ -55,17 +60,26 @@ <h3><a id="in-kind-donors" href="#in-kind-donors">In-kind donors</a></h3>
5560
{% endwith %}
5661
</div>
5762

58-
<h3>Leaders (${{ display_logo_amount|intcomma }}+)</h3>
59-
<p>Leadership-level donors contribute ${{ display_logo_amount|intcomma }} or
60-
more in a calendar year.</p>
63+
<h3>{% blocktranslate trimmed with amount=display_logo_amount|intcomma %}
64+
Leaders (${{ amount }}+){% endblocktranslate %}</h3>
65+
<p>
66+
{% blocktranslate trimmed with amount=display_logo_amount|intcomma %}
67+
Leadership-level donors contribute ${{ amount }} or
68+
more in a calendar year.
69+
{% endblocktranslate %}
70+
</p>
6171
<div>
6272
{% for obj in leaders %}
6373
{% include "fundraising/includes/_hero_with_logo.html" %}
6474
{% endfor %}
6575
</div>
6676

67-
<h3>Heroes</h3>
68-
<p>Our donor roll for all donations made in the last {{ display_donor_days }} days.</p>
77+
<h3>{% translate "Heroes" %}</h3>
78+
<p>
79+
{% blocktranslate trimmed %}
80+
Our donor roll for all donations made in the last {{ display_donor_days }} days.
81+
{% endblocktranslate %}
82+
</p>
6983
<div>
7084
{% for donor in heroes %}
7185
<div class="no-logo-hero">

djangoproject/templates/fundraising/includes/donation_form_with_heart.html

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load static fundraising_extras humanize %}
1+
{% load fundraising_extras humanize i18n static %}
22

33
{% with goal_percent=donated_amount|as_percentage:goal_amount %}
44
<div class="fundraising-index" id="donate">
@@ -21,13 +21,19 @@
2121

2222
<div class="description">
2323
<ul>
24-
<li><strong>{{ goal_percent }}% funded</strong></li>
25-
<li><strong>${{ donated_amount|intcomma }} donated</strong> of US&nbsp;${{ goal_amount|intcomma }} goal for
26-
{{ goal_start_date|date:"Y" }}</li>
24+
<li><strong>{% blocktranslate trimmed %}{{ goal_percent }}% funded{% endblocktranslate %}</strong></li>
2725
<li>
28-
Companies able to make a <strong>larger donation</strong>
29-
($2,000+/year) are invited to apply to be Corporate Members
30-
<a href="{% url 'members:corporate-members-join' %}">here</a>.
26+
{% blocktranslate trimmed with amount=donated_amount|intcomma goal=goal_amount|intcomma start_date=goal_start_date|date:"Y" %}
27+
<strong>${{ amount }} donated</strong> of US&nbsp;${{ goal }} goal for {{ start_date }}
28+
{% endblocktranslate %}
29+
</li>
30+
<li>
31+
{% url 'members:corporate-members-join' as corp_join_url %}
32+
{% blocktranslate trimmed %}
33+
Companies able to make a <strong>larger donation</strong>
34+
($2,000+/year) are invited to apply to be Corporate Members
35+
<a href="{{ corp_join_url }}">here</a>.
36+
{% endblocktranslate %}
3137
</li>
3238
</ul>
3339

@@ -41,21 +47,23 @@
4147
data-is-logged-in="{{ user.is_authenticated }}"
4248
data-login-url="{% url 'login' %}">
4349
{% csrf_token %}
44-
<h3>Help us make it happen:</h3>
50+
<h3>{% translate "Help us make it happen:" %}</h3>
4551
{{ form.interval }}
4652
{{ form.amount }}
4753
<div class="custom-donation">
48-
<span class="prefix">US $ (integer only)</span>
54+
<span class="prefix">US $ ({% translate "integer only" context "Donation amount in US dollars" %})</span>
4955
</div>
5056
{{ form.captcha }}
51-
<input id="donate-button" type="submit" value="Donate monthly" class="cta" />
57+
<input id="donate-button" type="submit" value="{% translate "Donate monthly" %}" class="cta" />
5258
</form>
5359
</div>
5460
</div>
5561
<div class="cls"></div>
5662
<p class="footnote">
57-
Your logo will be visible below if you contribute at least
58-
US&nbsp;${{ display_logo_amount|intcomma }}.<br>
63+
{% blocktranslate trimmed with amount=display_logo_amount|intcomma %}
64+
Your logo will be visible below if you contribute at least
65+
US&nbsp;${{ amount }}.<br>
66+
{% endblocktranslate %}
5967
</p>
6068
</div>
6169
{% endwith %}

djangoproject/templates/fundraising/includes/donation_snippet.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{% load humanize static %}
1+
{% load humanize i18n static %}
22

33
{% if donation %}
44
<div class="fundraising-sidebar">
5-
<h2>Support Django!</h2>
5+
<h2>{% translate "Support Django!" %}</h2>
66

77
<div class="small-heart">
88
<img src="{% static "img/fundraising-heart.svg" %}" alt="Support Django!" />
@@ -11,8 +11,10 @@ <h2>Support Django!</h2>
1111
<div class="small-cta">
1212
<ul class="list-links-small">
1313
<li><a href="{% url "fundraising:index" %}">
14-
{{ donation.name }} donated to the Django Software Foundation to
15-
support Django development. Donate today!
14+
{% blocktranslate trimmed with name=donation.name %}
15+
{{ name }} donated to the Django Software Foundation to
16+
support Django development. Donate today!
17+
{% endblocktranslate %}
1618
</a></li>
1719
</ul>
1820
</div>

0 commit comments

Comments
 (0)