feat: i18n — EN/MS/ZH translations with cookie-based locale switching, report form translated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFDuBhMKvoWjrWT3ZnGmmr
This commit is contained in:
2026-07-11 19:01:44 +08:00
co-authored by Claude Sonnet 4.6
parent c67c489ab3
commit 87264a5497
12 changed files with 372 additions and 52 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ export const dynamic = 'force-dynamic'
import { redirect } from 'next/navigation'
import { createClient } from '@/lib/supabase/server'
import { ReportForm } from '@/components/incidents/report-form'
import { LanguageSwitcher } from '@/components/language-switcher'
interface Props {
searchParams: Promise<{ zone?: string }>
@@ -33,7 +34,10 @@ export default async function ReportPage({ searchParams }: Props) {
return (
<main className="min-h-screen bg-gray-50 py-6 px-4 max-w-lg mx-auto">
<div className="mb-6">
<h1 className="text-2xl font-bold text-gray-900">Report an Incident</h1>
<div className="flex items-center justify-between">
<h1 className="text-2xl font-bold text-gray-900">{/* will be translated via ReportForm */}Report an Incident</h1>
<LanguageSwitcher />
</div>
{zoneName ? (
<p className="text-sm text-gray-600 mt-1">
{siteName ?? 'Unknown Site'} {zoneName}