Skip to content

Commit 6f1f569

Browse files
markswebbmispelon
authored andcommitted
[tracdb] Marked all user-facing strings for translation
Refs #1648
1 parent 438702c commit 6f1f569

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

djangoproject/templates/tracdb/bouncing_tickets.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{% extends "base_community.html" %}
2+
{% load i18n %}
23

34
{% block content-related %}{% endblock %}
45

5-
{% block title %}Bouncing Tickets{% endblock %}
6+
{% block title %}{% translate "Bouncing Tickets" %}{% endblock %}
67

78
{% block content %}
89

9-
<h1>Bouncing Tickets</h1>
10+
<h1>{% translate "Bouncing Tickets" %}</h1>
1011

11-
<h2 class="deck">Tickets that have been repeatedly reopened.</h2>
12+
<h2 class="deck">{% translate "Tickets that have been repeatedly reopened." %}</h2>
1213

1314
<table width="90%" class="docutils">
1415
<thead>
1516
<tr>
16-
<th>Ticket</th>
17-
<th>Times reopened</th>
18-
<th>Last reopened</th>
17+
<th>{% translate "Ticket" %}</th>
18+
<th>{% translate "Times reopened" %}</th>
19+
<th>{% translate "Last reopened" %}</th>
1920
</tr>
2021
</thead>
2122
<tbody>

tracdb/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Some models for pulling data from Trac.
33
44
Initially generated by inspectdb then modified heavily by hand, often by
5-
consulting http://trac.edgewall.org/wiki/TracDev/DatabaseSchema.
5+
consulting https://trac.edgewall.org/wiki/TracDev/DatabaseSchema.
66
7-
A few notes on tables that're left out and why:
7+
A few notes on tables that are left out and why:
88
99
* All the session and permission tables: they're just not needed.
1010
* Enum: I don't know what this is or what it's for.

tracdb/stats.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from collections import OrderedDict, namedtuple
77

88
from django.conf import settings
9+
from django.utils.translation import gettext_lazy as _
910

1011
from .models import Revision, Ticket, TicketChange
1112

@@ -41,7 +42,7 @@ def get_user_stats(username):
4142
return stats
4243

4344

44-
@stat("Commits")
45+
@stat(_("Commits"))
4546
def commit_count(username):
4647
count = Revision.objects.filter(author=username).count()
4748
# This assumes that the username is their GitHub username, this is very
@@ -50,23 +51,23 @@ def commit_count(username):
5051
return StatData(count=count, link=link)
5152

5253

53-
@stat("Tickets fixed")
54+
@stat(_("Tickets fixed"))
5455
def tickets_fixed(username):
5556
query = f"owner={username}&resolution=fixed"
5657
count = Ticket.objects.from_querystring(query).count()
5758
link = get_trac_link(query)
5859
return StatData(count=count, link=link)
5960

6061

61-
@stat("Tickets opened")
62+
@stat(_("Tickets opened"))
6263
def tickets_opened(username):
6364
query = f"reporter={username}"
6465
count = Ticket.objects.from_querystring(query).count()
6566
link = get_trac_link(query)
6667
return StatData(count=count, link=link)
6768

6869

69-
@stat("New tickets triaged")
70+
@stat(_("New tickets triaged"))
7071
def new_tickets_reviewed(username):
7172
# We don't want to de-dup as for tickets_closed: multiple reviews of the
7273
# same ticket should "count" as a review.

0 commit comments

Comments
 (0)