diff --git a/README.md b/README.md index 5ee92717d7..4014dde050 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Typst 日本語ドキュメント (非公式) [![CI/CD for website](https://github.com/typst-jp/typst-jp.github.io/actions/workflows/website.yml/badge.svg?branch=main&event=push)](https://github.com/typst-jp/typst-jp.github.io/actions/workflows/website.yml) -[![翻訳進捗](https://img.shields.io/badge/Translation%20Progress%20%2f%20翻訳進捗-28%25-orange.svg)](https://github.com/typst-jp/typst-jp.github.io/issues/44) > [!NOTE] > For English version, please refer to [README.en.md](README.en.md). diff --git a/website/src/components/ui/common/Header.tsx b/website/src/components/ui/common/Header.tsx index 091c29be61..b5efd4a8bb 100644 --- a/website/src/components/ui/common/Header.tsx +++ b/website/src/components/ui/common/Header.tsx @@ -5,28 +5,62 @@ import { typstOfficialUrl, version, } from "../../../metadata"; -import { DiscordIcon, GitHubIcon, MenuIcon, SearchIcon } from "../../icons"; +import { calculateTranslationProgressRate } from "../../../utils/translationStatus"; +import { + DiscordIcon, + GitHubIcon, + LanguageIcon, + MenuIcon, + SearchIcon, +} from "../../icons"; import { SiteTitle } from "./SiteTitle"; const VersionBadge = () => ( - + v{version} ); +const TranslationCoverageBadge = () => { + const rate = calculateTranslationProgressRate() * 100; + return ( +
+
+
+ +
+ 翻訳率 +
+
+
+
+
+ + {rate.toFixed(0)}% + +
+
+ ); +}; + export const Header = () => { return ( <>
-
-
- - +
+
+
+ + +
+
+ +
-
+