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:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { FollowButton } from "@/components/social/follow-button";
|
||||
@@ -16,6 +17,7 @@ type PersonResult = {
|
||||
};
|
||||
|
||||
export function PeopleSearch() {
|
||||
const t = useTranslations("people");
|
||||
const [q, setQ] = useState("");
|
||||
const [results, setResults] = useState<PersonResult[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
@@ -47,15 +49,15 @@ export function PeopleSearch() {
|
||||
<Input
|
||||
value={q}
|
||||
onChange={(e) => setQ(e.target.value)}
|
||||
placeholder="Search people by name or username…"
|
||||
placeholder={t("searchPlaceholder")}
|
||||
className="pl-9"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{loading && <p className="text-sm text-muted-foreground">Searching…</p>}
|
||||
{loading && <p className="text-sm text-muted-foreground">{t("searching")}</p>}
|
||||
|
||||
{!loading && q.trim().length >= 2 && results.length === 0 && (
|
||||
<p className="text-sm text-muted-foreground">No one found.</p>
|
||||
<p className="text-sm text-muted-foreground">{t("noneFound")}</p>
|
||||
)}
|
||||
|
||||
<div className="space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user