Skip to content

Add textlint to enforce style guide #11691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

jp-knj
Copy link
Contributor

@jp-knj jp-knj commented May 15, 2025

✨ What does this PR do?

This PR introduces textlint to enforce consistent writing style and terminology for localized documentation in:

  • πŸ‡―πŸ‡΅ Japanese (ja)
  • πŸ‡¨πŸ‡³ Simplified Chinese (zh-cn)

It uses per-language config files, not root-level .textlintrc.*.json, to keep the setup clean and scalable.


πŸ“ Directory Structure

astro/docs/
β”œβ”€β”€ src/
β”‚   └── content/
β”‚       └── docs/
β”‚           β”œβ”€β”€ ja/              ← Japanese translations
β”‚           └── zh-cn/           ← Simplified Chinese translations
β”œβ”€β”€ textlint/
β”‚   β”œβ”€β”€ ja/
β”‚   β”‚   β”œβ”€β”€ config.json          ← textlint config for Japanese
β”‚   β”‚   └── prh.yml              ← Japanese terminology dictionary
β”‚   └── zh-cn/
β”‚       β”œβ”€β”€ config.json          ← textlint config for Simplified Chinese
β”‚       └── prh.yml              ← Chinese terminology dictionary
β”œβ”€β”€ scripts/
β”‚   └── lint-text.mjs           ← Script to run textlint per language

Copy link

netlify bot commented May 15, 2025

βœ… Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
πŸ”¨ Latest commit 929e3bb
πŸ” Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/6825f9ebb0a7bf00081f38fc
😎 Deploy Preview https://deploy-preview-11691--astro-docs-2.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.

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.

1 participant