Skip to content

Commit 530e90e

Browse files
fix: apply suggestions
Co-authored-by: Y.D.X. <[email protected]>
1 parent dca1d60 commit 530e90e

File tree

4 files changed

+11
-25
lines changed

4 files changed

+11
-25
lines changed

website/src/components/ui/FunctionParameters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
6565
{param.strings.length > 0 && (
6666
<div class="mt-3">
6767
<h5 class="text-sm font-medium text-gray-700 mb-2">
68-
<Translation translationKey="stringValues" />:
68+
<Translation translationKey="stringValues" />
6969
</h5>
7070
<ul class="type-args space-y-2 pl-4">
7171
{param.strings.map((string) => (
@@ -87,7 +87,7 @@ export const FunctionParameters: FC<FunctionParametersProps> = ({
8787
{param.default && (
8888
<p class="mt-3 text-sm">
8989
<span class="font-medium">
90-
<Translation translationKey="defaultValue" />:
90+
<Translation translationKey="defaultValue" />
9191
</span>{" "}
9292
<span class="text-gray-700">
9393
<HtmlContent html={param.default} />

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
import {
2-
discordServerUrl,
3-
githubOrganizationUrl,
4-
githubRepositoryUrl,
5-
typstOfficialDocsUrl,
6-
version,
7-
} from "../../../metadata";
81
import { Translation } from "../../../translation";
92
import { InfoCircleIcon } from "../../icons";
103

@@ -52,10 +45,7 @@ export const SiteNoticeBanner = () => {
5245
<span class="inline-block w-px h-12 bg-neutral-200 mx-3" />
5346
</span>
5447
<span class="block flex-1 pt-1 pb-2 leading-normal sm:inline sm:pt-0 sm:pb-0">
55-
<Translation
56-
translationKey="siteNoticeBannerDescription"
57-
version={version}
58-
/>
48+
<Translation translationKey="siteNoticeBannerDescription" />
5949
</span>
6050
</div>
6151
</div>

website/src/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ samp {
6060
}
6161

6262
.info-box::before {
63-
content: "情報";
63+
content: "💡";
6464
@apply absolute top-0 left-0 bg-cyan-200 text-cyan-800 text-xs font-bold py-1 px-3 rounded-br;
6565
}
6666

website/src/translation.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
githubOrganizationUrl,
66
githubRepositoryUrl,
77
typstOfficialDocsUrl,
8+
version,
89
} from "./metadata";
910

1011
/**
@@ -73,6 +74,7 @@ type TranslationKey =
7374
| "translated"
7475
| "translatedMessage"
7576
| "siteNoticeBannerTitle"
77+
| "siteNoticeBannerDescription"
7678
| "tutorial"
7779
| "tutorialDescription"
7880
| "referenceDescription"
@@ -95,15 +97,13 @@ type TranslationKey =
9597

9698
export type TranslationProps =
9799
| { translationKey: TranslationKey }
98-
| { translationKey: "definitionOf"; name: string }
99-
| { translationKey: "siteNoticeBannerDescription"; version: string };
100+
| { translationKey: "definitionOf"; name: string };
100101

101102
/**
102103
* Translation component for UI text, descriptions, and other content to be embedded as JSX.
103104
*
104105
* @example
105106
* <Translation translationKey="definition" />
106-
* <Translation translationKey="siteNoticeBannerDescription" version="1.0.0" />
107107
*/
108108
export const Translation: FC<TranslationProps> = (props) => {
109109
switch (props.translationKey) {
@@ -120,9 +120,9 @@ export const Translation: FC<TranslationProps> = (props) => {
120120
case "search":
121121
return <>検索</>;
122122
case "defaultValue":
123-
return <>デフォルト値</>;
123+
return <>デフォルト値</>;
124124
case "stringValues":
125-
return <>使用可能な文字列値</>;
125+
return <>使用可能な文字列値</>;
126126
case "showExample":
127127
return <>例を表示</>;
128128
case "tableOfContents":
@@ -241,9 +241,7 @@ export const Translation: FC<TranslationProps> = (props) => {
241241
<>
242242
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「
243243
<a href={githubOrganizationUrl}>Typst Japanese Community</a>」が
244-
<a href={typstOfficialDocsUrl}>
245-
Typst v{props.version}の公式ドキュメント
246-
</a>
244+
<a href={typstOfficialDocsUrl}>Typst v{version}の公式ドキュメント</a>
247245
を翻訳したものです。誤訳や古い情報が含まれている可能性があるため、
248246
<a href={typstOfficialDocsUrl}>公式ドキュメント</a>
249247
との併用を推奨します。翻訳の改善やサイトの機能向上について、
@@ -253,9 +251,7 @@ export const Translation: FC<TranslationProps> = (props) => {
253251
にぜひご参加ください。
254252
<br />
255253
This site provides a Japanese translation of the{" "}
256-
<a href={typstOfficialDocsUrl}>
257-
Typst v{props.version} documentation
258-
</a>{" "}
254+
<a href={typstOfficialDocsUrl}>Typst v{version} documentation</a>{" "}
259255
maintained by the "
260256
<a href={githubOrganizationUrl}>Typst Japanese Community</a>" with
261257
permission from Typst GmbH. We recommend using this alongside the{" "}

0 commit comments

Comments
 (0)