Skip to content

Commit

Permalink
Email: Fix day name translations in mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
ranta committed Dec 19, 2024
1 parent 77bf218 commit 87618bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tilavarauspalvelu/admin/email_template/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
get_context_for_staff_notification_application_section_cancelled,
)
from tilavarauspalvelu.integrations.email.template_context.common import get_staff_reservations_ext_link
from tilavarauspalvelu.translation import get_translated
from utils.date_utils import local_datetime

if TYPE_CHECKING:
Expand All @@ -41,6 +42,7 @@
]


@get_translated
def get_mock_data(*, email_type: EmailType, language: Lang, **kwargs: Any) -> EmailContext | None: # noqa: PLR0912, PLR0911
email_recipient_name = kwargs.get("email_recipient_name", "[SÄHKÖPOSTIN VASTAANOTTAJAN NIMI]")
reservee_name = kwargs.get("reservee_name", "[VARAAJAN NIMI]")
Expand All @@ -62,20 +64,20 @@ def get_mock_data(*, email_type: EmailType, language: Lang, **kwargs: Any) -> Em
confirmed_instructions = kwargs.get("confirmed_instructions", "[HYVÄKSYTYN VARAUKSEN OHJEET]")
cancelled_instructions = kwargs.get("cancelled_instructions", "[PERUUTETUN VARAUKSEN OHJEET]")
pending_instructions = kwargs.get("pending_instructions", "[KÄSITELTÄVÄN VARAUKSEN OHJEET]")
weekday_value = kwargs.get("weekday_value", "Monday")
weekday_value = kwargs.get("weekday_value", str(WeekdayChoice.MONDAY.label))
time_value = kwargs.get("time_value", "13:00-15:00")
application_section_name = kwargs.get("application_section_name", "[HAKEMUKSEN OSAN NIMI]")
application_round_name = kwargs.get("application_round_name", "[KAUSIVARAUSKIERROKSEN NIMI]")
cancelled_reservation_series = kwargs.get(
"cancelled_reservation_series",
[
{
"weekday": WeekdayChoice.MONDAY.label,
"weekday": str(WeekdayChoice.MONDAY.label),
"time": "13:00-15:00",
"url": get_staff_reservations_ext_link(reservation_id=1234),
},
{
"weekday": WeekdayChoice.TUESDAY.label,
"weekday": str(WeekdayChoice.TUESDAY.label),
"time": "21:00-22:00",
"url": get_staff_reservations_ext_link(reservation_id=5678),
},
Expand Down

0 comments on commit 87618bb

Please sign in to comment.