[TASK] translate alerts

This commit is contained in:
Marie Birner
2023-10-23 22:52:11 +02:00
parent 52b245b14e
commit 8ebc06e445
5 changed files with 13 additions and 13 deletions

View File

@ -208,11 +208,11 @@ async fn home_logbook(
};
match logbook.home(db, user, data.into_inner()).await {
Ok(_) => Flash::success(Redirect::to("/log"), "Successfully updated log"),
Ok(_) => Flash::success(Redirect::to("/log"), "Ausfahrt korrekt eingetragen"),
Err(LogbookUpdateError::TooManyRowers(expected, actual)) => Flash::error(Redirect::to("/log"), format!("Zu viele Ruderer (Boot fasst maximal {expected}, es wurden jedoch {actual} Ruderer ausgewählt)")),
Err(_) => Flash::error(
Redirect::to("/log"),
format!("Logbook with ID {} could not be updated!", logbook_id),
format!("Eintrag {} konnte nicht abgesendet werden!", logbook_id),
),
}
}
@ -253,7 +253,7 @@ async fn delete(db: &State<SqlitePool>, logbook_id: i32, user: User) -> Flash<Re
match logbook.delete(db, &user).await {
Ok(_) => Flash::success(
Redirect::to("/log"),
format!("Logbook with ID {} successfully deleted!", logbook_id),
format!("Eintrag {} gelöscht!", logbook_id),
),
Err(LogbookDeleteError::NotYourEntry) => Flash::error(
Redirect::to("/log"),
@ -282,7 +282,7 @@ async fn delete_kiosk(
match logbook.delete(db, &cox).await {
Ok(_) => Flash::success(
Redirect::to("/log"),
format!("Logbook with ID {} successfully deleted!", logbook_id),
format!("Eintrag {} gelöscht!", logbook_id),
),
Err(LogbookDeleteError::NotYourEntry) => Flash::error(
Redirect::to("/log"),