Skip to content

i18n: wire the Topics page to next-intl - #517

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/topics-page-i18n
Jul 23, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:fix/topics-page-i18n

Conversation

@d180

@d180 d180 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

The Topics page (web/src/app/[locale]/(dashboard)/dashboard/topics/page.tsx) never adopted next-intl — the header, all four KPI cards (labels, subs, and the interpolated "pts"/"prompts without a topic" text), the export button and its tooltip, the leaderboard title/hint, both empty states, the table's column headers, the "Appeared in X of Y prompts" tooltip, the "Open topic details" aria-label, and the relative-time labels ("just now"/"Xm ago"/etc.) were all hardcoded English, and no topics namespace existed in en.json (the existing "topics" key is only the sidebar nav label). This routes every string through useTranslations('topics') with a new namespace — pure infra cleanup, no behavior change, following the same pattern already applied to the audit/reports/agent pages. CSV export column headers are left as plain snake_case identifiers, matching how other pages' exports already work.

Related issue

Closes #440

Type of change

  • fix — Bug fix

Checklist

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work — renaming the row variable to avoid shadowing the t() function was exactly the right call, and the #499 rate strings are all covered from a fresh base. English renders identically. Thanks!

@gkhngyk
gkhngyk merged commit 7daed00 into ansvisor:main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n: wire the Topics page to next-intl

2 participants