Skip to content

feat: add translation to "Functions" - #57

Merged
3w36zj6 merged 2 commits into
typst-community:mainfrom
ItsukiKigoshi:feat-translate-word-function
Apr 29, 2026
Merged

3w36zj6 merged 2 commits into
typst-community:mainfrom
ItsukiKigoshi:feat-translate-word-function

Conversation

@ItsukiKigoshi

Copy link
Copy Markdown
Contributor

Hello,

I am a new contributor to the translation project of Typst document in Japanese.
I recently found a missing translation for the word "Function".

In this pull request, I added the translation support to the word "Function" in all supported languages.

If this missng translation is intentional, please discard this change.

I am thrilled to contribute to my favourite text compiler, Typst!

Sincerely,
Itsuki Kigoshi

Issue

  • The translation to the word "function" was not provided.

Change

  • Add the "functions" to the TranslationComponentKey (Code)
	// Other texts in documentation
	// ...
	| "functions" // ADD THIS LINE
	| "tutorial"
  • Added translations to "functions" in English, Japanese, Simplefied Chinese

English (Code)

		case "functions":
			return <Fragment>Functions</Fragment>;

Japanese (Code)

		case "functions":
			return <Fragment>関数</Fragment>;

Simplified Chinese (Code)

		case "functions":
			return <Fragment>函数</Fragment>;

Preview

(Example in Japanese)

Before After
Image Image

@netlify

netlify Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for typst-docs-web ready!

Name Link
🔨 Latest commit 672b38a
🔍 Latest deploy log https://app.netlify.com/projects/typst-docs-web/deploys/69f1fa1444360300073603c3
😎 Deploy Preview https://deploy-preview-57--typst-docs-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@3w36zj6 3w36zj6 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks! Just please apply the Biome suggestions.

@YDX-2147483647 @typst-community/jp Could you take a quick look to see if you have any concerns?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a missing i18n key for the “Functions” section header and switches the GroupTemplate heading to use translations, ensuring the label is localized in all currently supported languages.

Changes:

  • Add "functions" to TranslationComponentKey.
  • Add "functions" translations in en-US, ja-JP, and zh-Hans.
  • Replace the hardcoded “Function” heading in GroupTemplate with <Translation translationKey="functions" />.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/translation/index.tsx Adds "functions" to the allowed translation keys so it can be used by components safely.
src/translation/en-US.tsx Implements the "functions" translation string for English.
src/translation/ja-JP.tsx Implements the "functions" translation string for Japanese.
src/translation/zh-Hans.tsx Implements the "functions" translation string for Simplified Chinese.
src/components/templates/GroupTemplate.tsx Uses the new translation key for the functions section heading instead of hardcoded English text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YDX-2147483647 YDX-2147483647 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution!

I've resolved the format error, and everything else looks fine.

The Functions heading doesn't have a tooltip. I find this a bit strange, but the upstream doesn't have it either (even in the latest typst/typst#8138). So no action is needed.

@3w36zj6
3w36zj6 merged commit 59cabb4 into typst-community:main Apr 29, 2026
16 checks passed
@ItsukiKigoshi

Copy link
Copy Markdown
Contributor Author

Dear @3w36zj6 and @YDX-2147483647 ,

Thank you for your review!
I really hope the documentation got better by my PR.

Sincerely, with love to Typst,
Itsuki

@ItsukiKigoshi
ItsukiKigoshi deleted the feat-translate-word-function branch April 29, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants