feat(website/i18n): 6 语(加 日/韩/俄/西)+ 默认英文

- strings.ts: [zh,en] 二元组 → Record<Lang,string> 六语对象(157 条,ja/ko/ru/es
  据英文翻译,无红线词,scan-redline 过);createT 回退英文;PRICES 补 4 语(复用
  USD 价)
- 路由:默认英文移到 /(原 zh);中文挪 /zh/;新增 /ja//ko//ru//es/;删冗余 /en/
- Site.astro:html lang / canonical / hreflang(6+x-default)/ og:locale 全部改
  为按语言查表(HTML_LANG/OG_LOCALE/langPath)
- Header.jsx:langseg 2 项 → 原生 select 6 语下拉(横排会挤);+ .langsel 样式
- astro build 通过,6 页生成;/ 英文、/zh/ 中文、/ja/ 日语标题均已本地化

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
wangjia
2026-07-07 13:29:35 +08:00
parent 3aeb2a8680
commit f0d574bc44
10 changed files with 258 additions and 183 deletions
+14
View File
@@ -40,6 +40,20 @@
}
.langseg a.on { background: var(--accent); color: var(--fg-on-accent); }
/* 6 语用原生下拉(横排段控会挤);沿用 langseg 的药丸视觉。 */
.langsel {
border: 1px solid var(--border);
cursor: pointer;
border-radius: var(--radius-full);
padding: 5px 9px;
font-family: var(--font-sans);
font-size: 12.5px;
font-weight: 700;
color: var(--fg2);
background: var(--bg-subtle);
}
.langsel:hover { border-color: var(--accent); }
/* 视觉隐藏(无障碍用,当前未强依赖) */
.visually-hidden {
position: absolute;