Skip to content

[scanner] ✨ i18n: wrap NotFound.tsx raw strings in t() calls#19321

Merged
clubanderson merged 1 commit into
mainfrom
scanner/fix-18036
Jun 21, 2026
Merged

[scanner] ✨ i18n: wrap NotFound.tsx raw strings in t() calls#19321
clubanderson merged 1 commit into
mainfrom
scanner/fix-18036

Conversation

@clubanderson

Copy link
Copy Markdown
Collaborator

Fixes #18036

First pass of the i18n completeness audit. Wraps all user-facing raw strings in the 404 NotFound page with react-i18next t() function calls.

Changes

  • web/src/components/NotFound.tsx — Added useTranslation hook, replaced all hardcoded strings with t() calls
  • web/src/locales/en/common.json — Added notFound.* and quickLinks.* translation keys

Coverage

  • Page title, description, CTA section, button labels, quick link names
  • This is the first step — additional components will be covered in follow-up PRs

First pass of i18n completeness audit — wraps all user-facing
strings in the 404 page with react-i18next t() function calls.
Adds translation keys to common.json for notFound and quickLinks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Scanner Agent <scanner@kubestellar.io>
Copilot AI review requested due to automatic review settings June 21, 2026 00:33
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 21, 2026
@netlify

netlify Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 068bb6c
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a37316c49c18a000837b6d4
😎 Deploy Preview https://deploy-preview-19321.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@github-actions

Copy link
Copy Markdown
Contributor

🐝 Hi @clubanderson! I'm kubestellar-hive[bot], an automation bot for this repo.

Trusted users — org members and contributors with write access — can mention @kubestellar-hive in a comment to trigger repo automation.
On issues, that mention queues an automated fix attempt. On pull requests, it records extra context for existing automation.
This is not an interactive Q&A bot, so mentions should be treated as requests for automation rather than a conversation.

Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies.

@github-actions github-actions Bot added ai-generated Pull request generated by AI tier/2-standard labels Jun 21, 2026
@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Coverage Check

All new source files in this PR have corresponding test files.

Checked web/src/hooks/ and web/src/components/ against origin/main.

Copilot AI 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.

Pull request overview

This PR advances the i18n completeness audit by replacing hard-coded, user-facing strings on the 404 NotFound page with react-i18next translation lookups and adding the required English translation keys.

Changes:

  • Updated NotFound.tsx to use useTranslation() and render all visible text via t(...).
  • Added new notFound.* and quickLinks.* keys to the English common.json locale file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
web/src/components/NotFound.tsx Replaces raw UI strings with t() calls and updates quick-links data shape to reference translation keys.
web/src/locales/en/common.json Adds English source strings for the NotFound page and its quick links.

Comment on lines 34 to 38
export default function NotFound() {
const location = useLocation()
const navigate = useNavigate()
const { t } = useTranslation()
const path = location.pathname
Comment on lines 68 to 71
<p className="text-muted-foreground text-base leading-relaxed">
<code className="px-2 py-0.5 bg-zinc-800 rounded text-sm text-purple-300">{path}</code>
{' '}doesn&apos;t exist yet — but it could!
{' '}{t('notFound.description')}
</p>
@clubanderson clubanderson merged commit 5e0f548 into main Jun 21, 2026
45 of 52 checks passed
@kubestellar-prow kubestellar-prow Bot deleted the scanner/fix-18036 branch June 21, 2026 00:55
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

@github-actions

Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 5e0f5488874109c950cc6a18560fb5239aba5e08
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/27889019680

@github-actions

Copy link
Copy Markdown
Contributor

Post-merge build verification passed

Both Go and frontend builds compiled successfully against merge commit 5e0f5488874109c950cc6a18560fb5239aba5e08.

clubanderson added a commit that referenced this pull request Jun 21, 2026
PR #19321 wrapped NotFound.tsx raw strings in t() calls but did not 
update the test. This adds the react-i18next mock following the same 
pattern used by other test files.

Fixes #19323

Signed-off-by: GitHub Copilot Scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
clubanderson added a commit that referenced this pull request Jun 21, 2026
v0.4 scope-substitution risk: i18n completeness (#18036) closed by
scanner PR #19321 — first v0.4 item done, but it is Tier 3 UX.
Tier 1 core features (llm-d/Drasi/kagent) still at zero PRs T-9 days.

Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
clubanderson added a commit that referenced this pull request Jun 21, 2026
…19327)

v0.4 scope-substitution risk: i18n completeness (#18036) closed by
scanner PR #19321 — first v0.4 item done, but it is Tier 3 UX.
Tier 1 core features (llm-d/Drasi/kagent) still at zero PRs T-9 days.

Signed-off-by: clubanderson <407614+clubanderson@users.noreply.github.com>
clubanderson added a commit that referenced this pull request Jun 21, 2026
* 🐛 fix NotFound.test.tsx: add i18n mock for t() translation keys

PR #19321 wrapped NotFound.tsx raw strings in t() calls but did not 
update the test. This adds the react-i18next mock following the same 
pattern used by other test files.

Fixes #19323

Signed-off-by: GitHub Copilot Scanner <scanner@kubestellar.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* 🐛 fix NotFound.tsx: align t() keys with common.json translations

Component used nonexistent keys (description, ctaTitle, ctaDescription,
ctaButton, quickLinks.*) — corrected to match actual common.json keys
(pathDoesNotExist, shipFast, aiAutomation, requestFeature,
notFound.quickLinks.*).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: clubanderson <clubanderson@users.noreply.github.com>

* 🐛 fix NotFound.tsx: align i18n keys with common.json

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Hive Scanner <hive-scanner@kubestellar.local>

---------

Signed-off-by: GitHub Copilot Scanner <scanner@kubestellar.io>
Signed-off-by: clubanderson <clubanderson@users.noreply.github.com>
Signed-off-by: Hive Scanner <hive-scanner@kubestellar.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: clubanderson <clubanderson@users.noreply.github.com>
Co-authored-by: Hive Scanner <hive-scanner@kubestellar.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tier/2-standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n completeness audit and translation coverage

2 participants