Skip to content

i18n(agent): the AI Agent page is fully hardcoded — no useTranslations, no agent namespace #382

Closed

Description

@gkhngyk

Problem

The AI Agent page (/dashboard/agent) ships entirely in hardcoded English — it never calls useTranslations, so none of its user-facing copy is localized. Every other translated dashboard page pulls its strings from a next-intl namespace; this one doesn't.

Where (from the code)

web/src/app/[locale]/(dashboard)/dashboard/agent/page.tsx — no useTranslations import anywhere. Hardcoded strings include:

  • confirm('Delete this conversation?') — line ~248
  • New chat button — line ~292
  • No conversations yet. empty state — line ~296
  • placeholder="Ask about visibility, competitors, citations…" — line ~373
  • toast.success('Copied') and the aria-label values (Copy message / Copied, Delete conversation) — lines ~406 / ~329 / ~458
  • The "no API key" empty state: Add your Anthropic API key, its paragraph, and Go to Settings — lines ~674–685

Note: unlike some other pages, there is no idle agent namespace to reuse — web/messages/en.json only has "agent": "Agent" as a nav label. So this needs a new agent page namespace, not just wiring.

What to change

  • Add an agent namespace to web/messages/en.json (and the other locale files) with keys for the strings above.
  • In page.tsx, call const t = useTranslations('agent') and replace the literals with t('…').
  • For the confirm(...) and aria-label / toast strings, pull the copy from t(...) as well (client component, so useTranslations is fine).

Mirror how an already-localized dashboard page wires next-intl (namespace in messages/*.json + useTranslations in the component).

Acceptance criteria

  • The Agent page renders all visible copy via useTranslations('agent') — no user-facing literals left in page.tsx.
  • A new agent namespace exists in web/messages/en.json (and the other locale files, English fallback is fine for now).
  • Delete-confirm dialog, empty states, input placeholder, copy/delete a11y labels, and the "add API key" state are all sourced from the namespace.
  • No behavior change — same text in English, just translatable.

Notes

  • Copy/wiring only; no logic changes. Good first issue for someone comfortable with next-intl.

Activity

  1. added
    enhancement
    good first issue
    on Jul 9, 2026
  2. gkhngyk commented on Jul 9, 2026

    @gkhngyk
    ContributorAuthor

    Consolidating the dashboard i18n cleanup into one tracking issue so it's all in one place: #384 (the Agent page is item 3 there). Closing this in favor of that. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions