Skip to content

Conversation

@Its-Just-Nans
Copy link
Contributor

@Its-Just-Nans Its-Just-Nans commented Aug 15, 2025

Related to https://github.com/typst-jp/typst-jp.github.io/issues/233

Sorry if there are mistakes :/

@3w36zj6 3w36zj6 requested review from 3w36zj6 and Copilot August 16, 2025 03:29

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Its-Just-Nans Its-Just-Nans requested a review from 3w36zj6 August 17, 2025 00:48
@3w36zj6
Copy link
Member

3w36zj6 commented Aug 17, 2025

Thank you for your work. I’ll review it later.

@3w36zj6 3w36zj6 linked an issue Aug 19, 2025 that may be closed by this pull request
12 tasks
@3w36zj6 3w36zj6 force-pushed the translation-in-single-file branch from d151ba8 to 63274a1 Compare September 1, 2025 05:23
@3w36zj6 3w36zj6 requested a review from Copilot September 1, 2025 05:24

This comment was marked as outdated.

@3w36zj6 3w36zj6 requested a review from Copilot September 1, 2025 05:36

This comment was marked as outdated.

@3w36zj6 3w36zj6 requested a review from Copilot September 1, 2025 05:49

This comment was marked as outdated.

@3w36zj6
Copy link
Member

3w36zj6 commented Sep 1, 2025

Hi, @YDX-2147483647
Could you please review this?

Copy link
Contributor

@YDX-2147483647 YDX-2147483647 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! I only found minor issues.

In addition to the comments below, there's a Japanese word in CSS .info-box, which is used by some markdown files.

.info-box::before {
content: "情報";

Image

Perhaps it could be changed to emoji? Say, 💡.


(Note that some texts are generated by typst-docs and the SSG can do nothing. If translation is really to be supported, we need to submit a similar PR to the upstream typst/typst.)

Co-authored-by: Y.D.X. <73375426+YDX-2147483647@users.noreply.github.com>
Copy link
Contributor

@YDX-2147483647 YDX-2147483647 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! 🚀

@3w36zj6 3w36zj6 requested a review from Copilot September 2, 2025 05:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR consolidates all translation strings into a single file (translation.tsx) to centralize translation management for the Japanese documentation website. The refactoring moves hardcoded Japanese text from various components into a structured translation system.

  • Centralized translation management by creating a single translation file
  • Replaced hardcoded Japanese strings throughout components with Translation components
  • Standardized icon accessibility by removing title elements and adding role attributes

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/src/translation.tsx Added comprehensive translation dictionary and Translation component with all Japanese strings
website/src/globals.css Updated info box content from "情報" to "💡" emoji
website/src/components/ui/common/TranslationStatusAlert.tsx Refactored to use Translation components instead of hardcoded strings
website/src/components/ui/common/TableOfContents.tsx Replaced hardcoded "目次" with Translation component
website/src/components/ui/common/SiteTitle.tsx Updated to use Translation components for document and language version labels
website/src/components/ui/common/SiteNoticeBanner.tsx Replaced lengthy hardcoded banner text with Translation component
website/src/components/ui/common/SearchWindow.tsx Updated search title and aria-label to use Translation
website/src/components/ui/common/Header.tsx Replaced hardcoded text with Translation components throughout header
website/src/components/ui/Tooltip.tsx Converted tooltip content and labels to use Translation system
website/src/components/ui/FunctionParameters.tsx Updated parameter labels to use Translation components
website/src/components/ui/FunctionDisplay.tsx Replaced "例を表示" with Translation component
website/src/components/templates/*.tsx Updated all template files to use Translation components
website/src/components/templates/BaseTemplate.tsx Comprehensive conversion to Translation system including page titles and navigation
website/src/components/icons/*.tsx Removed Japanese title elements and added role="graphics-symbol" for accessibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@3w36zj6 3w36zj6 changed the title feat: move translations to singlefile Sep 2, 2025
@3w36zj6 3w36zj6 merged commit 4b0856d into typst-jp:main Sep 2, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants