i18n: translate meal/drink pairing, nutrition, comments, DMs, people search, URL import
Full sweep of hardcoded English strings across:
- Meal pairing and drink pairing dialogs (titles, descriptions, role/
type labels, regenerate/generate buttons, progress labels) — also
fixed drink type labels that had French text hardcoded regardless
of locale ("Sans alcool"/"Chaud").
- Nutrition panel — had no useTranslations at all.
- Comments: header, empty/loading state, post/reply/cancel/delete
buttons, relative timestamps (just now/Xm ago/Xh ago/Xd ago), and
comment-reactions' toasts + aria-labels.
- Rating stars toasts.
- Direct messages: thread, conversation list, message button, both
/messages pages.
- People search page and component.
- URL import dialog (title, description, buttons, toasts).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import type { Metadata } from "next";
|
||||
import { headers } from "next/headers";
|
||||
import { MessageCircle } from "lucide-react";
|
||||
import { auth } from "@/lib/auth/server";
|
||||
import { ConversationsList } from "@/components/social/conversations-list";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Messages — Epicure" };
|
||||
|
||||
export default function MessagesPage() {
|
||||
export default async function MessagesPage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
const m = getMessages((session?.user as { locale?: string } | undefined)?.locale);
|
||||
|
||||
return (
|
||||
<div className="max-w-5xl mx-auto h-[calc(100vh-8rem)] border rounded-xl overflow-hidden flex">
|
||||
<div className="w-full sm:w-80 border-r shrink-0 overflow-y-auto">
|
||||
@@ -13,7 +19,7 @@ export default function MessagesPage() {
|
||||
<div className="hidden sm:flex flex-1 items-center justify-center text-muted-foreground">
|
||||
<div className="text-center space-y-2">
|
||||
<MessageCircle className="h-10 w-10 mx-auto opacity-50" />
|
||||
<p className="text-sm">Select a conversation</p>
|
||||
<p className="text-sm">{m.messages.selectConversation}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
import type { Metadata } from "next";
|
||||
import { headers } from "next/headers";
|
||||
import { auth } from "@/lib/auth/server";
|
||||
import { PeopleSearch } from "@/components/social/people-search";
|
||||
import { getMessages } from "@/lib/i18n/server";
|
||||
|
||||
export const metadata: Metadata = { title: "Find People — Epicure" };
|
||||
|
||||
export default function PeoplePage() {
|
||||
export default async function PeoplePage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
const m = getMessages((session?.user as { locale?: string } | undefined)?.locale);
|
||||
|
||||
return (
|
||||
<div className="max-w-2xl mx-auto space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Find People</h1>
|
||||
<p className="text-muted-foreground text-sm mt-1">Search for cooks to follow by name or username.</p>
|
||||
<h1 className="text-2xl font-bold tracking-tight">{m.people.title}</h1>
|
||||
<p className="text-muted-foreground text-sm mt-1">{m.people.subtitle}</p>
|
||||
</div>
|
||||
<PeopleSearch />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user