Allow chats to choose a locale

This commit is contained in:
2023-01-25 23:28:15 +01:00
parent f3136bd319
commit 747353d544
6 changed files with 52 additions and 11 deletions

View File

@@ -157,7 +157,7 @@ async fn check_task(bot: &Throttle<Bot>, reminder_time: NaiveTime, db: &Database
if now >= appointment.start {
reminder = Some(Reminder {
time: appointment.start,
text: t!("messages.starting_now"),
text: t!("messages.starting_now", locale = &chat_info.locale),
});
} else {
let reminder_date_time = now.date().and_time(reminder_time).unwrap();
@@ -166,6 +166,7 @@ async fn check_task(bot: &Throttle<Bot>, reminder_time: NaiveTime, db: &Database
time: reminder_date_time,
text: t!(
"messages.appointment_today",
locale = &chat_info.locale,
start_time = &appointment.start.format("%H:%M").to_string()
),
})