Skip to content

Commit 363e0e1

Browse files
committed
improve
1 parent fa4d5d2 commit 363e0e1

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

website/src/components/ui/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const Tooltip: FC<TooltipProps> = ({ kind }) => {
101101
<button
102102
type="button"
103103
class="w-4 h-4 hover:bg-black/10 rounded focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer"
104-
aria-label={`${content.label}${t("showInformation")}`}
104+
aria-label={`${content.label}${t("ariaShowInformation")}`}
105105
tabindex={0}
106106
{...{ "x-on:click": "helpOpen = true" }}
107107
{...{ "x-on:keydown.enter": "helpOpen = true" }}

website/src/components/ui/common/SiteNoticeBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const SiteNoticeBanner = () => {
5252
<span class="inline-block w-px h-12 bg-neutral-200 mx-3" />
5353
</span>
5454
<span class="block flex-1 pt-1 pb-2 leading-normal sm:inline sm:pt-0 sm:pb-0">
55-
<Translation translationKey="banner" />
55+
<Translation translationKey="banner" version={version}/>
5656
<br />
5757
This site provides a Japanese translation of the{" "}
5858
<a href={typstOfficialDocsUrl}>

website/src/components/ui/common/TranslationStatusAlert.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { FC, JSX } from "hono/jsx";
1+
import type { FC, JSXNode } from "hono/jsx";
22
import { twMerge } from "tailwind-merge";
33
import { Translation } from "../../../translations";
44
import type { TranslationStatus } from "../../../utils/translationStatus";
@@ -9,7 +9,7 @@ type StatusConfig = {
99
borderColor: string;
1010
textColor: string;
1111
iconColor: string;
12-
label: JSX.Element;
12+
label: JSXNode;
1313
message: string;
1414
};
1515

website/src/translations.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
githubOrganizationUrl,
55
githubRepositoryUrl,
66
typstOfficialDocsUrl,
7-
version,
87
} from "./metadata";
98

109
type MyMap = {
@@ -15,7 +14,7 @@ export const menuTranslations: MyMap = {
1514
lang: "ja",
1615
ariaCloseMenu: "メニューを閉じる",
1716
documentationTitle: "Typstドキュメント日本語版",
18-
showInformation: "の詳細情報を表示",
17+
ariaShowInformation: "の詳細情報を表示",
1918
ariaClose: "閉じる",
2019
ariaOpenSearch: "検索を開く",
2120
ariaOpenMenu: "メニューを開く",
@@ -81,7 +80,7 @@ type TranslationKey =
8180

8281
export type TranslationProps =
8382
| { translationKey: TranslationKey }
84-
| PropsWithChildren<{ translationKey: "banner" }>;
83+
| PropsWithChildren<{ translationKey: "banner"; version: string }>;
8584

8685
/*
8786
This is inferred as the following type:
@@ -226,7 +225,9 @@ export const Translation: FC<TranslationProps> = (props) => {
226225
<>
227226
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「
228227
<a href={githubOrganizationUrl}>Typst Japanese Community</a>」が
229-
<a href={typstOfficialDocsUrl}>Typst v{version}の公式ドキュメント</a>
228+
<a href={typstOfficialDocsUrl}>
229+
Typst v{props.version}の公式ドキュメント
230+
</a>
230231
を翻訳したものです。誤訳や古い情報が含まれている可能性があるため、
231232
<a href={typstOfficialDocsUrl}>公式ドキュメント</a>
232233
との併用を推奨します。翻訳の改善やサイトの機能向上について、

0 commit comments

Comments
 (0)