Foro multiidioma: nombres/descripciones de categorías y foros (ES/EN)

forum_categories.name_en y forums.name_en/description_en (sql/add_forum_en.sql,
aplicado en prod y traducidos los existentes: Comunidad/Anuncios/Discusión general).
getForumIndex(locale) y getForum(id, locale) usan EN si existe, si no caen al
español. Las páginas del foro pasan el locale. Labels (Temas/Mensajes) ya estaban
traducidos. Verificado: /en/forum en inglés, /es/forum en español.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-14 19:50:20 +00:00
parent 1d2aae5df2
commit cc6c76859c
4 changed files with 31 additions and 10 deletions
@@ -23,7 +23,7 @@ export default async function ForumPage({
const t = await getTranslations('Forum')
const id = Number(forumId)
const forum = await getForum(id)
const forum = await getForum(id, locale)
if (!forum) notFound()
const total = await countTopics(id)
const totalPages = Math.max(1, Math.ceil(total / PER_PAGE))
+1 -1
View File
@@ -10,7 +10,7 @@ export default async function ForumIndexPage({ params }: { params: Promise<{ loc
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations('Forum')
const categories = await getForumIndex()
const categories = await getForumIndex(locale)
return (
<PageShell title={t('title')}>