mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +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?"
|
||||
}
|
||||
},
|
||||
"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 />你确定要继续删除吗?"
|
||||
}
|
||||
},
|
||||
"noTrackedObjects": "找不到探测的对象"
|
||||
"noTrackedObjects": "找不到探测的对象",
|
||||
"fetchingTrackedObjectsFailed": "获取跟踪对象失败:{{errorMessage}}",
|
||||
"trackedObjectsCount": "{{count}} 个跟踪对象",
|
||||
"searchResult": {
|
||||
"deleteTrackedObject": {
|
||||
"toast": {
|
||||
"success": "跟踪对象删除成功。",
|
||||
"error": "删除跟踪对象失败:{{errorMessage}}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ export default function SearchResultActions({
|
||||
.delete(`events/${searchResult.id}`)
|
||||
.then((resp) => {
|
||||
if (resp.status == 200) {
|
||||
toast.success("Tracked object deleted successfully.", {
|
||||
toast.success(t("searchResult.deleteTrackedObject.toast.success"), {
|
||||
position: "top-center",
|
||||
});
|
||||
refreshResults();
|
||||
@ -83,9 +83,12 @@ export default function SearchResultActions({
|
||||
error.response?.data?.message ||
|
||||
error.response?.data?.detail ||
|
||||
"Unknown error";
|
||||
toast.error(`Failed to delete tracked object: ${errorMessage}`, {
|
||||
position: "top-center",
|
||||
});
|
||||
toast.error(
|
||||
t("searchResult.deleteTrackedObject.toast.error", { errorMessage }),
|
||||
{
|
||||
position: "top-center",
|
||||
},
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -200,7 +200,9 @@ export default function Explore() {
|
||||
revalidateAll: false,
|
||||
onError: (error) => {
|
||||
toast.error(
|
||||
`Error fetching tracked objects: ${error.response.data.message}`,
|
||||
t("fetchingTrackedObjectsFailed", {
|
||||
errorMessage: error.response.data.message,
|
||||
}),
|
||||
{
|
||||
position: "top-center",
|
||||
},
|
||||
|
||||
@ -21,6 +21,7 @@ import TimeAgo from "@/components/dynamic/TimeAgo";
|
||||
import SearchResultActions from "@/components/menu/SearchResultActions";
|
||||
import { SearchTab } from "@/components/overlay/detail/SearchDetailDialog";
|
||||
import { FrigateConfig } from "@/types/frigateConfig";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
type ExploreViewProps = {
|
||||
searchDetail: SearchResult | undefined;
|
||||
@ -137,6 +138,7 @@ function ThumbnailRow({
|
||||
setSimilaritySearch,
|
||||
onSelectSearch,
|
||||
}: ThumbnailRowType) {
|
||||
const { t } = useTranslation(["views/explore"]);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleSearch = (label: string) => {
|
||||
@ -152,12 +154,10 @@ function ThumbnailRow({
|
||||
{objectType.replaceAll("_", " ")}
|
||||
{searchResults && (
|
||||
<span className="ml-3 text-sm text-secondary-foreground">
|
||||
(
|
||||
{
|
||||
{t("trackedObjectsCount", {
|
||||
// @ts-expect-error we know this is correct
|
||||
searchResults[0].event_count
|
||||
}{" "}
|
||||
tracked objects){" "}
|
||||
count: searchResults[0].event_count,
|
||||
})}
|
||||
</span>
|
||||
)}
|
||||
{isValidating && <ActivityIndicator className="ml-2 size-4" />}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user