diff --git a/src/tera/admin/boat.rs b/src/tera/admin/boat.rs index 2cc186e..a370900 100644 --- a/src/tera/admin/boat.rs +++ b/src/tera/admin/boat.rs @@ -43,7 +43,7 @@ async fn delete(db: &State, _admin: AdminUser, boat: i32) -> Flash Flash::error(Redirect::to("/admin/boat"), "Boat does not exist"), @@ -63,7 +63,7 @@ async fn update( }; match boat.update(db, data.into_inner()).await { - Ok(_) => Flash::success(Redirect::to("/admin/boat"), "Successfully updated boat"), + Ok(_) => Flash::success(Redirect::to("/admin/boat"), "Boot bearbeitet"), Err(e) => Flash::error(Redirect::to("/admin/boat"), e), } } @@ -75,7 +75,7 @@ async fn create( _admin: AdminUser, ) -> Flash { match Boat::create(db, data.into_inner()).await { - Ok(_) => Flash::success(Redirect::to("/admin/boat"), "Successfully created boat"), + Ok(_) => Flash::success(Redirect::to("/admin/boat"), "Boot hinzugefügt"), Err(e) => Flash::error(Redirect::to("/admin/boat"), e), } } diff --git a/src/tera/admin/planned_event.rs b/src/tera/admin/planned_event.rs index c732944..2208d8b 100644 --- a/src/tera/admin/planned_event.rs +++ b/src/tera/admin/planned_event.rs @@ -36,7 +36,7 @@ async fn create( PlannedEvent::create(db, data.name, data.planned_amount_cox, trip_details).await; - Flash::success(Redirect::to("/"), "Successfully planned the event") + Flash::success(Redirect::to("/"), "Event hinzugefügt") } //TODO: add constraints (e.g. planned_amount_cox > 0) @@ -79,7 +79,7 @@ async fn delete(db: &State, id: i64, _admin: AdminUser) -> Flash { planned_event.delete(db).await; - Flash::success(Redirect::to("/"), "Successfully deleted the event") + Flash::success(Redirect::to("/"), "Event gelöscht") } None => Flash::error(Redirect::to("/"), "PlannedEvent does not exist"), } diff --git a/src/tera/admin/user.rs b/src/tera/admin/user.rs index dd17918..7a94196 100644 --- a/src/tera/admin/user.rs +++ b/src/tera/admin/user.rs @@ -35,7 +35,7 @@ async fn resetpw(db: &State, _admin: AdminUser, user: i32) -> Flash< user.reset_pw(db).await; Flash::success( Redirect::to("/admin/user"), - format!("Successfully reset pw of {}", user.name), + format!("Passwort von {} zurückgesetzt", user.name), ) } None => Flash::error(Redirect::to("/admin/user"), "User does not exist"), @@ -50,7 +50,7 @@ async fn delete(db: &State, _admin: AdminUser, user: i32) -> Flash Flash::error(Redirect::to("/admin/user"), "User does not exist"), diff --git a/src/tera/boatdamage.rs b/src/tera/boatdamage.rs index 8738e68..82fb350 100644 --- a/src/tera/boatdamage.rs +++ b/src/tera/boatdamage.rs @@ -133,7 +133,7 @@ async fn fixed<'r>( user_id_fixed: coxuser.id as i32, }; match boatdamage.fixed(db, boatdamage_fixed).await { - Ok(_) => Flash::success(Redirect::to("/boatdamage"), "Successfully fixed the boat."), + Ok(_) => Flash::success(Redirect::to("/boatdamage"), "Bootsschaden behoben."), Err(e) => Flash::error(Redirect::to("/boatdamage"), format!("Error: {e}")), } } @@ -158,7 +158,7 @@ async fn verified<'r>( match boatdamage.verified(db, boatdamage_verified).await { Ok(_) => Flash::success( Redirect::to("/boatdamage"), - "Successfully verified the boat.", + "Bootsschaden verifiziert", ), Err(e) => Flash::error(Redirect::to("/boatdamage"), format!("Error: {e}")), } diff --git a/src/tera/log.rs b/src/tera/log.rs index c7deb34..aa8fb3b 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -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, logbook_id: i32, user: User) -> Flash 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"),