From e608d28ec3cf85f394d9fa72e5e341619b9a1c13 Mon Sep 17 00:00:00 2001 From: hoelee Date: Sun, 6 Sep 2026 07:02:01 +0800 Subject: [PATCH] =?UTF-8?q?i18n:=20translate=20nav=20labels=20on=20Chinese?= =?UTF-8?q?=20pages=20(=E6=96=87=E7=AB=A0/=E5=88=86=E7=B1=BB/=E5=85=B3?= =?UTF-8?q?=E4=BA=8E)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BaseLayout.astro | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 8e82335..af2bff9 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -40,6 +40,11 @@ const ogImageUrl = new URL(ogImage, SITE.url).href; const isZh = lang === 'zh'; const resolvedSwitchHref = switchHref ?? (isZh ? '/' : '/zh/'); const switchLabel = isZh ? 'EN' : '中文'; + +// Locale-aware nav labels +const nav = isZh + ? { posts: '文章', categories: '分类', about: '关于', rss: 'RSS' } + : { posts: 'posts', categories: 'categories', about: 'about', rss: 'rss' }; --- @@ -128,10 +133,10 @@ const switchLabel = isZh ? 'EN' : '中文';