From c0591f69de3bad1c9ffdffcc3533768d3f6bc5ce Mon Sep 17 00:00:00 2001 From: yoma Date: Mon, 6 Jul 2026 13:25:47 +0800 Subject: [PATCH] fix: localize site agent install link --- apps/site/src/components/hero.astro | 4 ++-- apps/site/src/layouts/Layout.astro | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/site/src/components/hero.astro b/apps/site/src/components/hero.astro index f725b435..58794fb0 100644 --- a/apps/site/src/components/hero.astro +++ b/apps/site/src/components/hero.astro @@ -4,7 +4,7 @@ import heroProductImage from "@/assets/edgeever-hero-product.png"; import Link from "@/components/ui/link.astro"; import { Icon } from "astro-icon/components"; import { Meteors } from "@/components/magicui/meteors"; -import { getSiteLocale, siteCopy } from "@/i18n"; +import { getLocalizedPath, getSiteLocale, siteCopy } from "@/i18n"; const locale = getSiteLocale(Astro.url.pathname); const copy = siteCopy[locale].hero; @@ -45,7 +45,7 @@ const copy = siteCopy[locale].hero; diff --git a/apps/site/src/layouts/Layout.astro b/apps/site/src/layouts/Layout.astro index 1b9f2477..a6a206e8 100644 --- a/apps/site/src/layouts/Layout.astro +++ b/apps/site/src/layouts/Layout.astro @@ -62,7 +62,7 @@ const localeRedirectScript = `(() => { if (!locale) return null; const normalized = String(locale).toLowerCase(); - if (normalized === "zh" || normalized === "zh-cn" || normalized.startsWith("zh-hans")) { + if (normalized === "zh" || normalized.startsWith("zh-")) { return "zh-CN"; }