From 19ae307013dfcf0f790a7cf15ff2c4e62a053d07 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Wed, 14 Aug 2024 21:50:30 +0200 Subject: [PATCH] Add accounting context to translation messages --- src/accounting/models.py | 4 ++-- src/accounting/templates/accounting/order/detail.html | 8 ++++---- src/membership/emails.py | 2 +- src/membership/templates/membership/emails/order.txt | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/accounting/models.py b/src/accounting/models.py index 13abd88..a022995 100644 --- a/src/accounting/models.py +++ b/src/accounting/models.py @@ -80,8 +80,8 @@ class Order(CreatedModifiedAbstract): is_paid = models.BooleanField(default=False, verbose_name=_("is paid")) class Meta: - verbose_name = pgettext_lazy("accounting term", "Order") - verbose_name_plural = pgettext_lazy("accounting term", "Orders") + verbose_name = pgettext_lazy("accounting", "Order") + verbose_name_plural = pgettext_lazy("accounting", "Orders") def __str__(self) -> str: return f"Order ID {self.display_id}" diff --git a/src/accounting/templates/accounting/order/detail.html b/src/accounting/templates/accounting/order/detail.html index a3a0b0f..d97b3f7 100644 --- a/src/accounting/templates/accounting/order/detail.html +++ b/src/accounting/templates/accounting/order/detail.html @@ -2,7 +2,7 @@ {% load i18n %} {% block head_title %} - {% trans "Order" %} + {% trans "Order" context "accounting" %} {% endblock %} {% block content %} @@ -11,14 +11,14 @@

Order: {{ order.id }}

- {% trans "Ordered" %}: {{ order.created }}
- {% trans "Status" %}: {{ order.is_paid|yesno:_("paid,unpaid") }} + {% trans "Ordered" context "accounting" %}: {{ order.created }}
+ {% trans "Status" context "accounting" %}: {{ order.is_paid|yesno:_("paid,unpaid") }}

- + diff --git a/src/membership/emails.py b/src/membership/emails.py index 6a57718..6ae20d8 100644 --- a/src/membership/emails.py +++ b/src/membership/emails.py @@ -56,7 +56,7 @@ class BaseEmail(EmailMessage): c["request"] = self.request c["domain"] = site.domain c["site_name"] = site.name - c["protocol"] = "http" if self.request and not self.request.is_secure() else "https" + c["protocol"] = "https" # if self.request and not self.request.is_secure() else "https" return c def get_body(self) -> str: diff --git a/src/membership/templates/membership/emails/order.txt b/src/membership/templates/membership/emails/order.txt index 748428a..6e65366 100644 --- a/src/membership/templates/membership/emails/order.txt +++ b/src/membership/templates/membership/emails/order.txt @@ -10,7 +10,7 @@ If you received this email and no longer want a membership, you can ignore it. B Dansk: -Hej! Så kører medlemsystemet endeligt! Det er mega-fedt, fordi vi længe har haft besvær med manuelle procedurer. Nu har vi flyttet medlemsdata over på members.data.coop, og betalingen fungerer. Vi kan dermed fremover arbejde stille og roligt på at integrere systemet, så man kan styre sine services via medlemssystemet. +Hej! Så kører medlemsystemet endeligt! Det er mega-fedt, fordi vi længe har haft besvær med manuelle procedurer. Nu har vi flyttet medlemsdata over på member.data.coop, og betalingen fungerer. Vi kan dermed fremover arbejde stille og roligt på at integrere systemet, så man kan styre sine services via medlemssystemet. Hvis du ikke længere vil være medlem, kan du ignorere mailen her; men du må meget gerne informere os via board@data.coop, så vi kan slette evt. personlige data og services, du har kørende på dit tidligere medlemskab. -- 2.43.4
{% trans "Item" %}{% trans "Item" context "accounting" %} {% trans "Quantity" %} {% trans "Price" %} {% trans "VAT" %}