--- import { alternatePath, type Locale, t } from "@app/i18n"; import { ErrorView } from "~/components/errors/ErrorView"; import { createAppError, type AppErrorStatus } from "~/lib/errors"; import AppLayout from "~/layouts/AppLayout.astro"; export interface Props { locale: Locale; status: AppErrorStatus; } const { locale, status } = Astro.props; const other: Locale = locale === "zh-CN" ? "en" : "zh-CN"; const error = createAppError(status); const homeHref = locale === "zh-CN" ? "/zh-CN" : "/en"; const titleKey = `error.${error.kind}.title` as never; const pageTitle = t(locale, titleKey); ---