i18n keys

This commit is contained in:
Josh Hawkins 2025-05-09 10:46:29 -05:00
parent 75ed98a565
commit aff4563fcc
2 changed files with 14 additions and 5 deletions

View File

@ -98,6 +98,10 @@
"title": "Confirm Delete", "title": "Confirm Delete",
"desc": { "desc": {
"selected": "Are you sure you want to delete all recorded video associated with this review item?<br /><br />Hold the <em>Shift</em> key to bypass this dialog in the future." "selected": "Are you sure you want to delete all recorded video associated with this review item?<br /><br />Hold the <em>Shift</em> key to bypass this dialog in the future."
},
"toast": {
"success": "Video footage associated with the selected review items has been deleted successfully.",
"error": "Failed to delete: {{error}}"
} }
}, },
"button": { "button": {

View File

@ -47,7 +47,7 @@ export default function ReviewActionGroup({
.post(`reviews/delete`, { ids: selectedReviews }) .post(`reviews/delete`, { ids: selectedReviews })
.then((resp) => { .then((resp) => {
if (resp.status === 200) { if (resp.status === 200) {
toast.success("Reviews deleted successfully", { toast.success(t("recording.confirmDelete.toast.success"), {
position: "top-center", position: "top-center",
}); });
setSelectedReviews([]); setSelectedReviews([]);
@ -59,11 +59,16 @@ export default function ReviewActionGroup({
error.response?.data?.message || error.response?.data?.message ||
error.response?.data?.detail || error.response?.data?.detail ||
"Unknown error"; "Unknown error";
toast.error(`Failed to delete reviews: ${errorMessage}`, { toast.error(
position: "top-center", t("recording.confirmDelete.toast.error", {
}); error: errorMessage,
}),
{
position: "top-center",
},
);
}); });
}, [selectedReviews, setSelectedReviews, pullLatestData]); }, [selectedReviews, setSelectedReviews, pullLatestData, t]);
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
const [bypassDialog, setBypassDialog] = useState(false); const [bypassDialog, setBypassDialog] = useState(false);