|
1 | 1 | import { html } from "hono/html"; |
2 | 2 | import type { FC, PropsWithChildren } from "hono/jsx"; |
3 | 3 | import { basePath, originUrl, typstOfficialDocsUrl } from "../../metadata"; |
4 | | -import { Translation, t } from "../../translations"; |
| 4 | +import { Translation, translation } from "../../translation"; |
5 | 5 | import type { Page } from "../../types/model"; |
6 | 6 | import { joinPath, removeBasePath } from "../../utils/path"; |
7 | 7 | import { getTranslationStatus } from "../../utils/translationStatus"; |
@@ -55,19 +55,19 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({ |
55 | 55 | removeBasePath(basePath, route), |
56 | 56 | ); |
57 | 57 | return ( |
58 | | - <html lang={t("lang")} class="scroll-pt-24"> |
| 58 | + <html lang={translation.lang()} class="scroll-pt-24"> |
59 | 59 | <head> |
60 | 60 | <meta charSet="utf-8" /> |
61 | 61 | <title> |
62 | | - {title} – {t("documentationTitle")} |
| 62 | + {title} – {translation.documentationTitle()} |
63 | 63 | </title> |
64 | 64 | <meta name="description" content={description} /> |
65 | 65 | <meta name="viewport" content="width=device-width,initial-scale=1" /> |
66 | 66 | <meta name="theme-color" content="#239dad" /> |
67 | 67 | <meta property="og:url" content={absoluteRouteUrl} /> |
68 | 68 | <meta |
69 | 69 | property="og:title" |
70 | | - content={`${title} – ${t("documentationTitle")}`} |
| 70 | + content={`${title} – ${translation.documentationTitle()}`} |
71 | 71 | /> |
72 | 72 | <meta property="og:site_name" content="Typst" /> |
73 | 73 | <meta property="og:description" content={description} /> |
@@ -181,7 +181,7 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({ |
181 | 181 | type="button" |
182 | 182 | class="text-gray-600" |
183 | 183 | x-on:click="sidebarOpen = false" |
184 | | - aria-label={t("ariaCloseMenu")} |
| 184 | + aria-label={translation.ariaCloseMenu()} |
185 | 185 | > |
186 | 186 | <div class="w-6 h-6 text-gray-600 hover:text-gray-800 transition-colors"> |
187 | 187 | <CloseIcon /> |
|
0 commit comments