Skip to content

英語ページと i18n 対応を追加#21

Merged
mochi-yu merged 9 commits into
mainfrom
feat/english-page
May 30, 2026
Merged

英語ページと i18n 対応を追加#21
mochi-yu merged 9 commits into
mainfrom
feat/english-page

Conversation

@mochi-yu
Copy link
Copy Markdown
Contributor

@mochi-yu mochi-yu commented Apr 12, 2026

Summary

  • Astro の i18n ルーティング(defaultLocale: jalocales: en/ja)を有効化し、英語トップページ(/en/)と英語ニュース記事(/en/news/[slug])を追加
  • ヘッダーに言語切り替え UI を追加し、切り替え時は同一ページの対応ロケールへ遷移するよう getLocaleUrlForPage で URL を生成
  • トップ・ニュース・スポンサー募集など、レイアウトが近い箇所は Astro.currentLocale で文言を切り替え。About など構成が大きく異なる部分は AboutEn.astro を分離
  • ニュース記事ページを NewsArticlePage に共通化し、日英の pages は薄いラッパーに整理
  • 今後の実装方針を docs/i18n.md にまとめ

Test plan

  • npm run dev//en/ を開き、各セクションの文言・レイアウトが意図どおりか確認
  • ヘッダーの言語切り替えで、トップ・ニュース一覧・ニュース記事など各ページで対応ロケールの同一コンテンツに遷移することを確認
  • /news/[slug]/en/news/[slug] で記事が表示され、戻るリンク・日付表記がロケールに合っているか確認
  • ビルド(npm run build)が通ること

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 12, 2026

Deploy Preview for unrivaled-empanada-4b1c20 ready!

Name Link
🔨 Latest commit cc5eb33
🔍 Latest deploy log https://app.netlify.com/projects/unrivaled-empanada-4b1c20/deploys/6a1aa184ee87de00080d9c7a
😎 Deploy Preview https://deploy-preview-21--unrivaled-empanada-4b1c20.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@mochi-yu mochi-yu changed the title wip: 英語用のページを追加 feat: 英語ページと i18n 対応を追加 May 30, 2026
@mochi-yu mochi-yu requested review from masakurapa and sat0ken May 30, 2026 07:51
@mochi-yu mochi-yu marked this pull request as ready for review May 30, 2026 07:51
@mochi-yu mochi-yu changed the title feat: 英語ページと i18n 対応を追加 英語ページと i18n 対応を追加 May 30, 2026
Copy link
Copy Markdown
Contributor

@masakurapa masakurapa left a comment

Choose a reason for hiding this comment

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

👍

@mochi-yu mochi-yu merged commit d3af73c into main May 30, 2026
4 checks passed
@mochi-yu mochi-yu deleted the feat/english-page branch May 30, 2026 08:36
@masakurapa masakurapa mentioned this pull request May 30, 2026
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.

2 participants