Skip to content

Commit 9997c22

Browse files
authored
[djangoproject] Marked all user-facing strings for translation
Refs #1648
1 parent 2d05221 commit 9997c22

33 files changed

+1354
-885
lines changed

djangoproject/settings/common.py

-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@
222222

223223
USE_I18N = True
224224

225-
USE_L10N = False
226225

227226
USE_TZ = False
228227

djangoproject/templates/400.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{% extends 'base_error.html' %}
2+
{% load i18n %}
23

3-
{% block title %}Bad request{% endblock %}
4+
{% block title %}{% translate "Bad request" %}{% endblock %}
45

56
{% block header %}<h1>400</h1>{% endblock %}
67

78
{% block content %}
8-
<h2>Bad request</h2>
9+
<h2>{% translate "Bad request" %}</h2>
910

10-
<p>Yikes, this was a bad request. Not sure why, but it sure was bad.</p>
11+
<p>{% translate "Yikes, this was a bad request. Not sure why, but it sure was bad." %}</p>
1112
{% endblock %}

djangoproject/templates/403.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{% extends 'base_error.html' %}
2+
{% load i18n %}
23

3-
{% block title %}Permission denied{% endblock %}
4+
{% block title %}{% translate "Permission denied" %}{% endblock %}
45

56
{% block header %}<h1>403</h1>{% endblock %}
67

78
{% block content %}
8-
<h2>Permission denied</h2>
9+
<h2>{% translate "Permission denied" %}</h2>
910

10-
<p>Apologies, but it seems as if you're not allowed to access this page. We honestly hope this is just a mistake.</p>
11+
<p>{% translate "Apologies, but it seems as if you're not allowed to access this page. We honestly hope this is just a mistake." %}</p>
1112
{% endblock %}

djangoproject/templates/404.html

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{% extends 'base_error.html' %}
2+
{% load i18n %}
23

3-
{% block title %}Page not found{% endblock %}
4+
{% block title %}{% translate "Page not found" %}{% endblock %}
45

56
{% block header %}<h1>404</h1>{% endblock %}
67

78
{% block content %}
8-
<h2>Page not found</h2>
9+
<h2>{% translate "Page not found" %}</h2>
910

10-
<p>Looks like you followed a bad link. If you think it's our fault, please <a href="https://code.djangoproject.com/">let us know</a>.</p>
11+
<p>
12+
{% blocktranslate trimmed %}
13+
Looks like you followed a bad link. If you think it's our fault, please
14+
<a href="https://code.djangoproject.com/">let us know</a>.
15+
{% endblocktranslate %}</p>
1116

12-
<p>Here's a link to the <a href="{% url 'homepage' %}">homepage</a>. You know, just in case.</p>
17+
{% url 'homepage' as homepage_url %}
18+
<p>
19+
{% blocktranslate trimmed %}
20+
Here's a link to the <a href="{{ homepage_url }}">homepage</a>. You know, just in case.
21+
{% endblocktranslate %}</p>
1322

1423
{% endblock %}

djangoproject/templates/410.html

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
{% extends 'base_error.html' %}
2+
{% load i18n %}
23

3-
{% block title %}Page removed{% endblock %}
4+
{% block title %}{% translate "Page removed" %}{% endblock %}
45

56
{% block header %}<h1>410</h1>{% endblock %}
67

78
{% block content %}
8-
<h2>Page removed.</h2>
9+
<h2>{% translate "Page removed." %}</h2>
910

10-
<p>Sorry, we've removed some of parts of the site that were completely out
11-
of date. In most cases, that content has been moved into
12-
<a href="{% url 'homepage' host 'docs' %}">the new documentation site</a>.</p>
11+
{% url 'homepage' host 'docs' as docs_url %}
12+
<p>
13+
{% blocktranslate trimmed %}
14+
Sorry, we've removed some of parts of the site that were completely out
15+
of date. In most cases, that content has been moved into
16+
<a href="{{ docs_url }}">the new documentation site</a>.
17+
{% endblocktranslate %}</p>
1318

14-
<p>Here's a link to the <a href="{% url 'homepage' %}">homepage</a>. You know, just in case.</p>
19+
{% url 'homepage' as homepage_url %}
20+
<p>
21+
{% blocktranslate trimmed %}
22+
Here's a link to the <a href="{{ homepage_url }}">homepage</a>. You know, just in case.
23+
{% endblocktranslate %}
24+
</p>
1525

1626
{% endblock %}

djangoproject/templates/500.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{% extends 'base_error.html' %}
2+
{% load i18n %}
23

3-
{% block title %}Page unavailable{% endblock %}
4+
{% block title %}{% translate "Page unavailable" %}{% endblock %}
45

56
{% block header %}<h1>500</h1>{% endblock %}
67

78
{% block content %}
8-
<h2>Page unavailable</h2>
9+
<h2>{% translate "Page unavailable" %}</h2>
910

10-
<p>We're sorry, but the requested page is currently unavailable.</p>
11+
<p>{% translate "We're sorry, but the requested page is currently unavailable." %}</p>
1112

12-
<p>We're messing around with things internally, and the server had a bit of a hiccup.</p>
13+
<p>{% translate "We're messing around with things internally, and the server had a bit of a hiccup." %}</p>
1314

14-
<p>Please try again later.</p>
15+
<p>{% translate "Please try again later." %}</p>
1516
{% endblock %}
+43-31
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,67 @@
11
{% extends "base.html" %}
2-
{% load fundraising_extras %}
2+
{% load fundraising_extras i18n %}
33

4-
{% block og_title %}Django Community{% endblock %}
5-
{% block og_description %}Building the Django Community. Come join us!{% endblock %}
4+
{% block og_title %}{% translate "Django Community" %}{% endblock %}
5+
{% block og_description %}{% translate "Building the Django Community. Come join us!" %}{% endblock %}
66

77
{% block layout_class %}sidebar-right{% endblock %}
8-
{% block title %}Django Community{% endblock %}
8+
{% block title %}{% translate "Django Community" %}{% endblock %}
99

1010
{% block header %}
11-
<h1 class="visuallyhidden">Community</h1>
12-
<p>Building the <em>Django</em> Community{% if community_stats %}
13-
{% if community_stats.age %} for <em>{{ community_stats.age }}</em>{% endif %}{% endif %}. Come join us!</p>
11+
<h1 class="visuallyhidden">{% translate "Community" %}</h1>
12+
<p>
13+
{% if community_stats.age %}
14+
{% blocktranslate trimmed with age=community_stats.age %}
15+
Building the <em>Django</em> Community for <em>{{ age }}</em>.
16+
{% endblocktranslate %}
17+
{% else %}
18+
{% translate "Building the <em>Django</em> Community." %}
19+
{% endif %}
20+
{% translate "Come join us!" %}
21+
</p>
1422
{% endblock %}
1523

1624
{% block content-related %}
17-
<h1 class="visuallyhidden">Additional Information</h1>
25+
<h1 class="visuallyhidden">{% translate "Additional Information" %}</h1>
1826
<div role="complementary">
1927
{% donation_snippet %}
2028

21-
<h2>More Help</h2>
29+
<h2>{% translate "More Help" %}</h2>
2230
<dl class="list-links">
23-
<dt><a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">Frequently Asked Questions</a></dt>
24-
<dd>The FAQ answers many common questions</dd>
31+
<dt>
32+
<a href="{% url 'document-detail' lang='en' version='stable' url='faq' host 'docs' %}">
33+
{% translate "Frequently Asked Questions" %}
34+
</a>
35+
</dt>
36+
<dd>{% translate "The FAQ answers many common questions" %}</dd>
2537
<dt><a href="https://www.reddit.com/r/django/" rel="nofollow">r/Django Subreddit</a></dt>
26-
<dd>News and links on Reddit</dd>
38+
<dd>{% translate "News and links on Reddit" %}</dd>
2739
<dt><a href="https://stackoverflow.com/questions/tagged/django" rel="nofollow">StackOverflow</a></dt>
28-
<dd>Search community answers</dd>
29-
<dt><a href="irc://irc.libera.chat/django">#django IRC Channel</a></dt>
30-
<dd>Chat with other Django users like it's 1999</dd>
40+
<dd>{% translate "Search community answers" %}</dd>
41+
<dt><a href="irc://irc.libera.chat/django">{% translate "#django IRC Channel" %}</a></dt>
42+
<dd>{% translate "Chat with other Django users like it's 1999" %}</dd>
3143
</dl>
3244

33-
<h2>Dive In</h2>
45+
<h2>{% translate "Dive In" %}</h2>
3446
<dl class="list-links">
35-
<dt><a href="https://code.djangoproject.com/">Ticket System</a></dt>
36-
<dd>View and update bug reports</dd>
37-
<dt><a href="https://dashboard.djangoproject.com/">Development Dashboard</a></dt>
38-
<dd>Statistics about Django development</dd>
39-
<dt><a href="https://groups.google.com/group/django-updates">django-updates Mailing List</a></dt>
40-
<dd>Get updated for each code and ticket change</dd>
47+
<dt><a href="https://code.djangoproject.com/">{% translate "Ticket System" %}</a></dt>
48+
<dd>{% translate "View and update bug reports" %}</dd>
49+
<dt><a href="https://dashboard.djangoproject.com/">{% translate "Development Dashboard" %}</a></dt>
50+
<dd>{% translate "Statistics about Django development" %}</dd>
51+
<dt><a href="https://groups.google.com/group/django-updates">{% translate "django-updates Mailing List" %}</a></dt>
52+
<dd>{% translate "Get updated for each code and ticket change" %}</dd>
4153
</dl>
4254

43-
<h2>More Links</h2>
55+
<h2>{% translate "More Links" %}</h2>
4456
<dl class="list-links">
45-
<dt><a href="https://www.djangopackages.com/" rel="nofollow">Django Packages</a></dt>
46-
<dd>Find third-party packages to supercharge your project</dd>
47-
<dt><a href="https://builtwithdjango.com/projects/" rel="nofollow">Django-powered Sites</a></dt>
48-
<dd>Add your site to the list</dd>
49-
<dt><a href="/community/badges/">Django Badges</a></dt>
50-
<dd>Show your support (or wish longingly)</dd>
51-
<dt><a href="/community/logos/">Django Logos</a></dt>
52-
<dd>Download official logos</dd>
57+
<dt><a href="https://www.djangopackages.com/" rel="nofollow">{% translate "Django Packages" %}</a></dt>
58+
<dd>{% translate "Find third-party packages to supercharge your project" %}</dd>
59+
<dt><a href="https://builtwithdjango.com/projects/" rel="nofollow">{% translate "Django-powered Sites" %}</a></dt>
60+
<dd>{% translate "Add your site to the list" %}</dd>
61+
<dt><a href="/community/badges/">{% translate "Django Badges" %}</a></dt>
62+
<dd>{% translate "Show your support (or wish longingly)" %}</dd>
63+
<dt><a href="/community/logos/">{% translate "Django Logos" %}</a></dt>
64+
<dd>{% translate "Download official logos" %}</dd>
5365
</dl>
5466
</div>
5567
{% endblock %}
+18-14
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,31 @@
11
{% extends "base_community.html" %}
2+
{% load i18n %}
3+
24
{% block header %}
3-
<h1 class="visuallyhidden">Code of Conduct</h1>
4-
<p>Code of Conduct</p>
5+
<h1 class="visuallyhidden">{% translate "Code of Conduct" %}</h1>
6+
<p>{% translate "Code of Conduct" %}</p>
57
{% endblock %}
68

79
{% block content-related %}
810
<div role="complementary">
9-
<h2>Django Community Code of Conduct</h2>
11+
<h2>{% translate "Django Community Code of Conduct" %}</h2>
1012

1113
<ul class="list-links">
12-
<li><a href="{% url 'code_of_conduct' %}">Code of Conduct</a></li>
13-
<li><a href="/foundation/committees/#conduct">Committee</a></li>
14-
<li><a href="{% url 'conduct_faq' %}">Frequently Asked Questions</a></li>
15-
<li><a href="{% url 'conduct_reporting' %}">Reporting Guide</a></li>
16-
<li><a href="{% url 'conduct_enforcement' %}">Enforcement Manual</a></li>
17-
<li><a href="{% url 'conduct_changes' %}">Changes</a></li>
14+
<li><a href="{% url 'code_of_conduct' %}">{% translate "Code of Conduct" %}</a></li>
15+
<li><a href="/foundation/committees/#conduct">{% translate "Committee" %}</a></li>
16+
<li><a href="{% url 'conduct_faq' %}">{% translate "Frequently Asked Questions" %}</a></li>
17+
<li><a href="{% url 'conduct_reporting' %}">{% translate "Reporting Guide" %}</a></li>
18+
<li><a href="{% url 'conduct_enforcement' %}">{% translate "Enforcement Manual" %}</a></li>
19+
<li><a href="{% url 'conduct_changes' %}">{% translate "Changes" %}</a></li>
1820
</ul>
1921

20-
<h2>License</h2>
22+
<h2>{% translate "License" %}</h2>
2123
<p>
22-
All content on this page is licensed under a
23-
<a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons
24-
Attribution </a> license.
24+
{% blocktranslate trimmed %}
25+
All content on this page is licensed under a
26+
<a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons
27+
Attribution </a> license.
28+
{% endblocktranslate %}
2529
</p>
2630
<p>
2731
<a href="https://creativecommons.org/licenses/by/3.0/">
@@ -31,4 +35,4 @@ <h2>License</h2>
3135
</div>
3236
{% endblock %}
3337

34-
{% block title %}Django Code of Conduct{% endblock %}
38+
{% block title %}{% translate "Django Code of Conduct" %}{% endblock %}
+50-38
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,62 @@
11
{% extends "conduct/base.html" %}
2+
{% load date_format i18n %}
23

3-
{% block title %}Django Code of Conduct - Changes{% endblock %}
4+
{% block title %}{% translate "Django Code of Conduct - Changes" %}{% endblock %}
45

5-
{% block og_title %}Django Code of Conduct - Changes{% endblock %}
6-
{% block og_description %}Changes to the Code of Conduct{% endblock %}
6+
{% block og_title %}{% translate "Django Code of Conduct - Changes" %}{% endblock %}
7+
{% block og_description %}{% translate "Changes to the Code of Conduct" %}{% endblock %}
78

89
{% block content %}
9-
<h1>Django Code of Conduct - Changes</h1>
10-
11-
<h2>Change control process</h2>
12-
13-
<p>We're (mostly) programmers, so we'll track changes to the code of conduct and
14-
associated documents the same way we track changes to code. All changes will
15-
proposed via a pull request to the
16-
<a href="https://github.com/django/djangoproject.com">djangoproject.com repository
17-
on GitHub</a>. Changes will be reviewed by the conduct committee first, and then
18-
sent to the DSF and the Django community for comment.
19-
We'll hold a comment period of at least one week, then the DSF board will vote on
20-
the change. Approved changes will be merged, published, and noted below.</p>
21-
22-
<p>This only applies to material changes; changes that don't effect the intent
23-
(typo fixes, re-wordings, etc.) can be made immediately.</p>
24-
25-
<p>A complete list of changes can always be found
26-
<a href="https://github.com/django/djangoproject.com/commits/main/templates/conduct">on GitHub</a>;
27-
major changes and releases are summarized below.</p>
28-
29-
<h2>Changelog</h2>
10+
<h1>{% translate "Django Code of Conduct - Changes" %}</h1>
11+
12+
<h2>{% translate "Change control process" %}</h2>
13+
14+
<p>
15+
{% blocktranslate trimmed %}
16+
We're (mostly) programmers, so we'll track changes to the code of conduct and
17+
associated documents the same way we track changes to code. All changes will
18+
be proposed via a pull request to the
19+
<a href="https://github.com/django/djangoproject.com">djangoproject.com repository
20+
on GitHub</a>. Changes will be reviewed by the conduct committee first, and then
21+
sent to the DSF and the Django community for comment.
22+
We'll hold a comment period of at least one week, then the DSF board will vote on
23+
the change. Approved changes will be merged, published, and noted below.{% endblocktranslate %}</p>
24+
25+
<p>
26+
{% blocktranslate trimmed %}
27+
This only applies to material changes; changes that don't affect the intent
28+
(typo fixes, re-wordings, etc.) can be made immediately{% endblocktranslate %}</p>
29+
30+
<p>
31+
{% blocktranslate trimmed %}
32+
A complete list of changes can always be found
33+
<a href="https://github.com/django/djangoproject.com/commits/main/templates/conduct">on GitHub</a>;
34+
major changes and releases are summarized below.{% endblocktranslate %}</p>
35+
36+
<h2>{% translate "Changelog" %}</h2>
3037

3138
<dl>
32-
<dt>October 3, 2014</dt>
33-
<dd><a href="https://github.com/django/djangoproject.com/commit/577a02bbe968de79f8e111d6139f0c1299e994e9">
34-
Revised text</a> to clarify that behavior outside the community is a contributing factor to involvement in the Django community; and explicitly provided a non-exhaustive list of diversity groups we consider included under the policy.</dd>
35-
36-
<dt>July 31, 2013</dt>
37-
<dd>Documents approved and officially published.</dd>
38-
39-
<dt>July 15, 2013</dt>
39+
<dt>{% isodate "2014-10-03" %}</dt>
40+
<dd>
41+
{% blocktranslate trimmed %}
42+
<a href="https://github.com/django/djangoproject.com/commit/577a02bbe968de79f8e111d6139f0c1299e994e9">
43+
Revised text</a> to clarify that behavior outside the community is a contributing factor to involvement in the
44+
Django community; and explicitly provided a non-exhaustive list of diversity groups we consider included under the policy.
45+
{% endblocktranslate %}</dd>
46+
47+
<dt>{% isodate "2013-07-31" %}</dt>
48+
<dd>{% translate "Documents approved and officially published." %}</dd>
49+
50+
<dt>{% isodate "2013-07-15" %}</dt>
4051
<dd><a href="https://github.com/django/djangoproject.com/commit/ae21fb5cb1f7edfca5b5556d92fb86186d92aeb3">
41-
Added the reporting guide and enforcement manual</a>. Final draft presented
42-
to the board and core membership for vote.</dd>
52+
{% blocktranslate trimmed %}
53+
Added the reporting guide and enforcement manual</a>. Final draft presented
54+
to the board and core membership for vote.{% endblocktranslate %}</dd>
4355

44-
<dt>April 1, 2013</dt>
45-
<dd><a href="https://github.com/django/djangoproject.com/commit/1a0aae11a331bfbf36d6f4091d77413b780454e5">
46-
Initial "beta" release and public call for comments</a>.</dd>
56+
<dt>{% isodate "2013-04-01" %}</dt>
57+
<dd><a href="https://github.com/django/djangoproject.com/commit/1a0aae11a331bfbf36d6f4091d77413b780454e5">
58+
{% blocktranslate trimmed %}Initial "beta" release and public call for comments{% endblocktranslate %}</a>.</dd>
4759

48-
</dl>
60+
</dl>
4961

5062
{% endblock %}

0 commit comments

Comments
 (0)