-
Notifications
You must be signed in to change notification settings - Fork 14
feat: 各ページの翻訳状態の管理機能を実装 #136
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
Conversation
There was a problem hiding this 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 pull request implements a code-based system for managing the translation status of website pages. Key changes include:
- Adding a JSON schema (translation-status.schema.json) to validate translation state data.
- Creating a translation-status.json file that maps page routes to their translation status.
- Implementing utility functions in translationStatus.ts to load, save, register routes, and calculate translation progress, with integration in index.tsx to register new routes.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| website/translation-status.schema.json | New JSON schema for validating the translation status file |
| website/translation-status.json | New JSON file mapping website routes to translation statuses |
| website/src/utils/translationStatus.ts | Utility functions for managing translation status, including file I/O and progress calculation |
| website/src/index.tsx | Integration of route registration using the new translation status mechanism |
Comments suppressed due to low confidence (1)
website/src/utils/translationStatus.ts:13
- Using process.cwd() to resolve the translation status file path may lead to unexpected behavior if the working directory changes. Consider using __dirname (or an equivalent approach) for a more predictable file path resolution.
const TRANSLATION_STATUS_FILE = path.resolve(process.cwd(), "translation-status.json");
|
このプルリクエストの確認をさせてください。 現在は状態管理用のファイル 運用としては、翻訳のプルリクエストの際に |
はい。
同じ認識です。Webサイト側でこの機能を利用した箇所が追加された段階でCONTRIBUTINGに追記しようと考えています。 |
kimushun1101
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご回答ありがとうございました。問題ないと思います。
そこまで大規模でもないため、関数のテストや修正が必要であれば機能実装の際に行いましょう。
変更点
背景
現在は翻訳状況をメタIssueで管理していますが、将来的にWebサイト上で各ページの翻訳状態や翻訳率を表示したいことを考えると、コードベースでも翻訳状況を管理した方が良いと思います。