[scanner] ✨ i18n: wrap NotFound.tsx raw strings in t() calls#19321
Conversation
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>
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
👋 Hey @clubanderson — thanks for opening this PR!
This is an automated message. |
|
🐝 Hi @clubanderson! I'm Trusted users — org members and contributors with write access — can mention Automation may take a moment to start, and follow-up happens through workflow activity rather than chat replies. |
✅ Test Coverage CheckAll new source files in this PR have corresponding test files. Checked |
There was a problem hiding this comment.
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.tsxto useuseTranslation()and render all visible text viat(...). - Added new
notFound.*andquickLinks.*keys to the Englishcommon.jsonlocale 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. |
| export default function NotFound() { | ||
| const location = useLocation() | ||
| const navigate = useNavigate() | ||
| const { t } = useTranslation() | ||
| const path = location.pathname |
| <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't exist yet — but it could! | ||
| {' '}{t('notFound.description')} | ||
| </p> |
|
Thank you for your contribution! Your PR has been merged. Check out what's new:
Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey |
✅ Post-Merge Verification: passedCommit: |
|
Post-merge build verification passed ✅ Both Go and frontend builds compiled successfully against merge commit |
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.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>
Fixes #18036
First pass of the i18n completeness audit. Wraps all user-facing raw strings in the 404 NotFound page with
react-i18nextt()function calls.Changes
web/src/components/NotFound.tsx— AddeduseTranslationhook, replaced all hardcoded strings witht()callsweb/src/locales/en/common.json— AddednotFound.*andquickLinks.*translation keysCoverage