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:
@@ -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))
|
||||
|
||||
@@ -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')}>
|
||||
|
||||
Reference in New Issue
Block a user