mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
feat: add more page i18n keys
This commit is contained in:
parent
637eb4a3d9
commit
bd9ece7297
@ -149,5 +149,15 @@
|
|||||||
"desc": "Deleting this tracked object removes the snapshot, any saved embeddings, and any associated object lifecycle entries. Recorded footage of this tracked object in History view will <em>NOT</em> be deleted.<br /><br />Are you sure you want to proceed?"
|
"desc": "Deleting this tracked object removes the snapshot, any saved embeddings, and any associated object lifecycle entries. Recorded footage of this tracked object in History view will <em>NOT</em> be deleted.<br /><br />Are you sure you want to proceed?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"noTrackedObjects": "No Tracked Objects Found"
|
"noTrackedObjects": "No Tracked Objects Found",
|
||||||
|
"fetchingTrackedObjectsFailed": "Error fetching tracked objects: {{errorMessage}}",
|
||||||
|
"trackedObjectsCount": "{{count}} tracked objects ",
|
||||||
|
"searchResult": {
|
||||||
|
"deleteTrackedObject": {
|
||||||
|
"toast": {
|
||||||
|
"success": "Tracked object deleted successfully.",
|
||||||
|
"error": "Failed to delete tracked object: {{errorMessage}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,5 +149,15 @@
|
|||||||
"desc": "删除此跟踪对象将移除快照、所有已保存的嵌入数据以及任何关联的对象生命周期条目。但在历史视图中的录制视频<em>不会</em>被删除。<br /><br />你确定要继续删除吗?"
|
"desc": "删除此跟踪对象将移除快照、所有已保存的嵌入数据以及任何关联的对象生命周期条目。但在历史视图中的录制视频<em>不会</em>被删除。<br /><br />你确定要继续删除吗?"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"noTrackedObjects": "找不到探测的对象"
|
"noTrackedObjects": "找不到探测的对象",
|
||||||
|
"fetchingTrackedObjectsFailed": "获取跟踪对象失败:{{errorMessage}}",
|
||||||
|
"trackedObjectsCount": "{{count}} 个跟踪对象",
|
||||||
|
"searchResult": {
|
||||||
|
"deleteTrackedObject": {
|
||||||
|
"toast": {
|
||||||
|
"success": "跟踪对象删除成功。",
|
||||||
|
"error": "删除跟踪对象失败:{{errorMessage}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -72,7 +72,7 @@ export default function SearchResultActions({
|
|||||||
.delete(`events/${searchResult.id}`)
|
.delete(`events/${searchResult.id}`)
|
||||||
.then((resp) => {
|
.then((resp) => {
|
||||||
if (resp.status == 200) {
|
if (resp.status == 200) {
|
||||||
toast.success("Tracked object deleted successfully.", {
|
toast.success(t("searchResult.deleteTrackedObject.toast.success"), {
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
});
|
});
|
||||||
refreshResults();
|
refreshResults();
|
||||||
@ -83,9 +83,12 @@ export default function SearchResultActions({
|
|||||||
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 tracked object: ${errorMessage}`, {
|
toast.error(
|
||||||
|
t("searchResult.deleteTrackedObject.toast.error", { errorMessage }),
|
||||||
|
{
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -200,7 +200,9 @@ export default function Explore() {
|
|||||||
revalidateAll: false,
|
revalidateAll: false,
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
toast.error(
|
toast.error(
|
||||||
`Error fetching tracked objects: ${error.response.data.message}`,
|
t("fetchingTrackedObjectsFailed", {
|
||||||
|
errorMessage: error.response.data.message,
|
||||||
|
}),
|
||||||
{
|
{
|
||||||
position: "top-center",
|
position: "top-center",
|
||||||
},
|
},
|
||||||
|
|||||||
@ -21,6 +21,7 @@ import TimeAgo from "@/components/dynamic/TimeAgo";
|
|||||||
import SearchResultActions from "@/components/menu/SearchResultActions";
|
import SearchResultActions from "@/components/menu/SearchResultActions";
|
||||||
import { SearchTab } from "@/components/overlay/detail/SearchDetailDialog";
|
import { SearchTab } from "@/components/overlay/detail/SearchDetailDialog";
|
||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
type ExploreViewProps = {
|
type ExploreViewProps = {
|
||||||
searchDetail: SearchResult | undefined;
|
searchDetail: SearchResult | undefined;
|
||||||
@ -137,6 +138,7 @@ function ThumbnailRow({
|
|||||||
setSimilaritySearch,
|
setSimilaritySearch,
|
||||||
onSelectSearch,
|
onSelectSearch,
|
||||||
}: ThumbnailRowType) {
|
}: ThumbnailRowType) {
|
||||||
|
const { t } = useTranslation(["views/explore"]);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleSearch = (label: string) => {
|
const handleSearch = (label: string) => {
|
||||||
@ -152,12 +154,10 @@ function ThumbnailRow({
|
|||||||
{objectType.replaceAll("_", " ")}
|
{objectType.replaceAll("_", " ")}
|
||||||
{searchResults && (
|
{searchResults && (
|
||||||
<span className="ml-3 text-sm text-secondary-foreground">
|
<span className="ml-3 text-sm text-secondary-foreground">
|
||||||
(
|
{t("trackedObjectsCount", {
|
||||||
{
|
|
||||||
// @ts-expect-error we know this is correct
|
// @ts-expect-error we know this is correct
|
||||||
searchResults[0].event_count
|
count: searchResults[0].event_count,
|
||||||
}{" "}
|
})}
|
||||||
tracked objects){" "}
|
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{isValidating && <ActivityIndicator className="ml-2 size-4" />}
|
{isValidating && <ActivityIndicator className="ml-2 size-4" />}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user