You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
i18n(topics): Topics page is fully hardcoded English — extract strings into a translation namespace #383
The Topics dashboard page (/dashboard/topics) renders every string as a hardcoded English literal — it never calls useTranslations, unlike the already-internationalized Site Audit and Reports pages. This leaves the page out of the i18n system and inconsistent with the rest of the dashboard.
web/src/app/[locale]/(dashboard)/dashboard/topics/page.tsx has no useTranslations import at all; sample hardcoded strings:
Header (page.tsx:265-268): "Topics", "Topic-level analytics across all tracked prompts (last 30 days)"
KPI card labels / sub-text (page.tsx:305-335): "Tracked topics", "Best performer", "Biggest gap", "Top mover (7d)", plus subs like "N prompts without a topic", "All prompts categorised", "Best performer", "No data yet", "Not enough data"
Empty state (page.tsx:361-366): "No topics defined yet.", "Add topics from brand settings to enable topic-based analytics."
Table column headers and other literals throughout.
What to change
Mirror the pattern the Audit and Reports pages already use:
web/src/app/[locale]/(dashboard)/dashboard/reports/page.tsx → const t = useTranslations('reports')
web/src/app/[locale]/(dashboard)/dashboard/audit/page.tsx → const t = useTranslations('audit')
Steps:
Add a new topics namespace to web/messages/en.json with keys for the header, KPI labels + sub-texts, table headers, and empty state. (Note: there's no topics page namespace yet — the existing "topics": "Topics" at line 24 is the nav label, not a page namespace. A new top-level topics block is needed, like audit (line 33) and reports (line 393).)
In topics/page.tsx, add import { useTranslations } from 'next-intl', call const t = useTranslations('topics'), and replace the literals with t('…') calls.
Acceptance criteria
topics/page.tsx uses useTranslations('topics') — no user-facing hardcoded English literals remain (header, KPI labels/subs, table headers, empty state).
A topics namespace exists in web/messages/en.json covering every extracted string.
The page renders identically in English (same copy) — this is extraction only, no visible wording change.
Pattern matches the existing audit / reports pages.
Notes
Currently only en.json exists, so this is primarily about i18n-readiness and consistency with the already-translated pages — not a behavior change.
Consolidating the dashboard i18n cleanup into one tracking issue so it's all in one place: #384 (the Topics page is item 2 there). Closing this in favor of that. Thanks!
Activity
gkhngyk commentedon Jul 9, 2026
Consolidating the dashboard i18n cleanup into one tracking issue so it's all in one place: #384 (the Topics page is item 2 there). Closing this in favor of that. Thanks!