diff options
| author | Mark Walker <mark@marksweb.co.uk> | 2024-10-24 00:40:52 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2025-11-21 21:54:50 +0100 |
| commit | 6f1f569476d7142fa004559aef5a824776ff2627 (patch) | |
| tree | 1faf80ddec1960244688faacf98da3490f043f74 /tracdb | |
| parent | 438702c3a280d2cff17d6f278093318645ac9278 (diff) | |
[tracdb] Marked all user-facing strings for translation
Refs #1648
Diffstat (limited to 'tracdb')
| -rw-r--r-- | tracdb/models.py | 4 | ||||
| -rw-r--r-- | tracdb/stats.py | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tracdb/models.py b/tracdb/models.py index 6dc81934..44f92774 100644 --- a/tracdb/models.py +++ b/tracdb/models.py @@ -2,9 +2,9 @@ Some models for pulling data from Trac. Initially generated by inspectdb then modified heavily by hand, often by -consulting http://trac.edgewall.org/wiki/TracDev/DatabaseSchema. +consulting https://trac.edgewall.org/wiki/TracDev/DatabaseSchema. -A few notes on tables that're left out and why: +A few notes on tables that are left out and why: * All the session and permission tables: they're just not needed. * Enum: I don't know what this is or what it's for. diff --git a/tracdb/stats.py b/tracdb/stats.py index 2cfa6c1b..05c78bc8 100644 --- a/tracdb/stats.py +++ b/tracdb/stats.py @@ -6,6 +6,7 @@ import operator from collections import OrderedDict, namedtuple from django.conf import settings +from django.utils.translation import gettext_lazy as _ from .models import Revision, Ticket, TicketChange @@ -41,7 +42,7 @@ def get_user_stats(username): return stats -@stat("Commits") +@stat(_("Commits")) def commit_count(username): count = Revision.objects.filter(author=username).count() # This assumes that the username is their GitHub username, this is very @@ -50,7 +51,7 @@ def commit_count(username): return StatData(count=count, link=link) -@stat("Tickets fixed") +@stat(_("Tickets fixed")) def tickets_fixed(username): query = f"owner={username}&resolution=fixed" count = Ticket.objects.from_querystring(query).count() @@ -58,7 +59,7 @@ def tickets_fixed(username): return StatData(count=count, link=link) -@stat("Tickets opened") +@stat(_("Tickets opened")) def tickets_opened(username): query = f"reporter={username}" count = Ticket.objects.from_querystring(query).count() @@ -66,7 +67,7 @@ def tickets_opened(username): return StatData(count=count, link=link) -@stat("New tickets triaged") +@stat(_("New tickets triaged")) def new_tickets_reviewed(username): # We don't want to de-dup as for tickets_closed: multiple reviews of the # same ticket should "count" as a review. |
