Skip to content

Conversation

@hikahana
Copy link
Contributor

@hikahana hikahana commented Jan 9, 2026

対応Issue

resolve #0

概要

実装詳細

画面スクリーンショット等

テスト項目

  • [ ]
  • [ ]
  • [ ]

備考

…イズ。カスタムフックからのテキスト取得を統一し、コードの可読性を向上。
…。カスタムフックを導入してテキスト取得を統一し、コードの可読性を向上。
…トをローカライズ。カスタムフックを通じてテキスト取得を統一し、コードの可読性を向上。
…ーカライズ。カスタムフックを通じてテキスト取得を統一し、コードの可読性を向上。
Copy link

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

このPRは、Next.js 15アプリケーションに対してnext-i18nextを使用した日本語・英語の多言語対応を実装しています。主な変更点は、ハードコードされた文字列を翻訳キーに置き換え、各コンポーネントでカスタムフックを通じて翻訳テキストを取得するパターンへの移行です。

主な変更内容:

  • _app.tsxappWithTranslationHOCを追加し、各ページにgetStaticPropsで翻訳データを提供
  • バリデーションスキーマ内のエラーメッセージを翻訳キーに変更
  • 選択肢データ(list.ts)をlabelKeyベースの構造に変更し、動的翻訳をサポート
  • 各コンポーネントに専用のテキスト取得フックを追加(例: useWelcomeBoxTextsuseUserEditModalTexts)
  • エラーメッセージの翻訳処理を統一

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

@hikahana
Copy link
Contributor Author

hikahana commented Jan 9, 2026

@copilot コードレビューして

Copy link

Copilot AI commented Jan 9, 2026

@hikahana I've opened a new pull request, #1990, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

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

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

Copy link

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

3 participants