feat: document locale url (#18409)

* feat: document locale url

* fix: remove debug code

* fix readme_cn line

* feat: add menu document locale url
This commit is contained in:
GuoQing Liu
2025-05-28 06:10:45 -06:00
committed by GitHub
parent cbdac9ece5
commit 9b7d4d0a8f
18 changed files with 128 additions and 36 deletions
+5 -1
View File
@@ -32,6 +32,7 @@ import { getAttributeLabels } from "@/utils/iconUtil";
import { Trans, useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { LuExternalLink } from "react-icons/lu";
import { useDocDomain } from "@/hooks/use-doc-domain";
type ZoneEditPaneProps = {
polygons?: Polygon[];
@@ -63,6 +64,7 @@ export default function ZoneEditPane({
setSnapPoints,
}: ZoneEditPaneProps) {
const { t } = useTranslation(["views/settings"]);
const { getLocaleDocUrl } = useDocDomain();
const { data: config, mutate: updateConfig } =
useSWR<FrigateConfig>("config");
@@ -673,7 +675,9 @@ export default function ZoneEditPane({
{t("masksAndZones.zones.speedEstimation.desc")}
<div className="mt-2 flex items-center text-primary">
<Link
to="https://docs.frigate.video/configuration/zones#speed-estimation"
to={getLocaleDocUrl(
"configuration/zones#speed-estimation",
)}
target="_blank"
rel="noopener noreferrer"
className="inline"