--- // 账户页的 en/cn 共享实现(语言由 Astro.currentLocale 运行时决定)。 // 对应页面:src/pages/{en,cn}/account.astro —— 仅做薄包装,避免同一份 300+ 行实现写两遍。 import Layout from "@/layouts/Layout.astro" import { getI18n } from "@/lib/i18n" import { href, ROUTES } from "@/lib/routes" import { config } from '@/lib/config' const { locale, t } = getI18n(Astro) const SITE_NAME = config.siteName ?? "Xisoa" const accountDesc = locale === 'cn' ? `管理你在 ${SITE_NAME} 的收藏造型与浏览历史。` : `Manage your saved looks and view history on your ${SITE_NAME} account.` const accountKeywords = locale === 'cn' ? `账户,收藏,浏览历史,${SITE_NAME}` : `account,saved looks,history,${SITE_NAME}` const titleLabel = t("my account") const pleaseLabel = t("please log in") const loginLabel = t("login") const historyLabel = t("my history") const savedLooksLabel = t("saved looks") const loginUrl = href(locale, ROUTES.login) + "?redirect=" + encodeURIComponent(href(locale, ROUTES.account)) const archiveUrl = href(locale, ROUTES.runwayLooks) // 预翻译常量:Alpine 表达式里没有 t()(t 仅 Astro 服务端存在),文案一律走模板插值。 const removeLabel = t("remove") const itemsLabel = t("items") const clearHistoryLabel = t("clear history") const noSavedLabel = t("no saved looks yet") const noHistoryLabel = t("no history yet") const browseLabel = t("browse the archive") ---

{pleaseLabel}

{titleLabel}

{loginLabel}

{t("member profile")}

{t("vip")}

Portfolio Studio

Archive 2026

Paris · Milan · Tokyo

{savedLooksLabel}

{itemsLabel}

{noSavedLabel}

{browseLabel}

{historyLabel}

{itemsLabel}

{noHistoryLabel}

{browseLabel}