[TASK] translate alerts
This commit is contained in:
@ -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"),
|
||||
|
Reference in New Issue
Block a user