-
Notifications
You must be signed in to change notification settings - Fork 3
i18nによる日本語、英語の多言語対応 #1989
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
base: gm3/develop
Are you sure you want to change the base?
i18nによる日本語、英語の多言語対応 #1989
Conversation
…トやバリデーションメッセージをローカライズ
…をローカライズ。合計電力制限を定数化し、関連するロジックを更新。
…デーションメッセージをローカライズ
…リデーションメッセージをローカライズ
…やバリデーションメッセージをローカライズ
…装。バリデーションメッセージもi18nextに対応させて更新。
…。バリデーションメッセージもi18nextに対応させて更新。
…ロジックフックの名称を変更し、コードの可読性を向上。
…ックからのテキスト取得を統一し、コードの可読性を向上。
…キスト取得を統一し、コードの可読性を向上。
…からのテキスト取得を統一し、コードの可読性を向上。
…を導入してテキスト取得を統一し、コードの可読性を向上。
…イズ。カスタムフックからのテキスト取得を統一し、コードの可読性を向上。
…。カスタムフックを導入してテキスト取得を統一し、コードの可読性を向上。
…フックを導入してテキスト取得を統一し、コードの可読性を向上。
…トをローカライズ。カスタムフックを通じてテキスト取得を統一し、コードの可読性を向上。
…フックを通じてテキスト取得を統一し、コードの可読性を向上。
…ーカライズ。カスタムフックを通じてテキスト取得を統一し、コードの可読性を向上。
…ムフックを通じてテキスト取得を統一し、コードの可読性を向上。
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
このPRは、Next.js 15アプリケーションに対してnext-i18nextを使用した日本語・英語の多言語対応を実装しています。主な変更点は、ハードコードされた文字列を翻訳キーに置き換え、各コンポーネントでカスタムフックを通じて翻訳テキストを取得するパターンへの移行です。
主な変更内容:
_app.tsxにappWithTranslationHOCを追加し、各ページにgetStaticPropsで翻訳データを提供- バリデーションスキーマ内のエラーメッセージを翻訳キーに変更
- 選択肢データ(
list.ts)をlabelKeyベースの構造に変更し、動的翻訳をサポート - 各コンポーネントに専用のテキスト取得フックを追加(例:
useWelcomeBoxTexts、useUserEditModalTexts) - エラーメッセージの翻訳処理を統一
Reviewed changes
Copilot reviewed 124 out of 125 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| user/src/pages/_app.tsx | next-i18nextのHOCを追加してアプリ全体に翻訳機能を提供 |
| user/src/pages/index.tsx, home/index.tsx | getStaticPropsで翻訳データを読み込み |
| user/src/utils/validate/validate.ts | zodスキーマのエラーメッセージを翻訳キーに変更 |
| user/src/utils/list.ts | 学年・学科リストをlabelKeyベースに変更し、動的翻訳をサポート |
| user/src/components/*/hooks.ts (多数) | 各コンポーネント用のテキスト取得フックを追加 |
| user/src/components/Form/* | フォーム部品で翻訳されたエラーメッセージとラベルを使用 |
| user/src/components/Applications/* | 申請関連コンポーネントの全テキストを翻訳キー化 |
| user/src/components/LanguageSwitcher/* | 言語切り替え用の新規コンポーネント |
| .cursorrules | 日本語出力指定を追加 |
Files not reviewed (1)
- user/pnpm-lock.yaml: Language not supported
|
@copilot コードレビューして |
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
Copilot reviewed 124 out of 125 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- user/pnpm-lock.yaml: Language not supported
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
対応Issue
resolve #0
概要
実装詳細
画面スクリーンショット等
テスト項目
備考