Skip to content

Commit 228d5d8

Browse files
Hive ScannerCopilot
andcommitted
🐛 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>
1 parent c5fd42b commit 228d5d8

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

web/src/components/NotFound.test.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ vi.mock('react-i18next', () => ({
1212
t: (key: string) => {
1313
const map: Record<string, string> = {
1414
'notFound.title': 'Page not found',
15-
'notFound.pathDoesNotExist': "doesn't exist yet — but it could!",
16-
'notFound.shipFast': 'Ship it in hours, not months',
17-
'notFound.aiAutomation': 'KubeStellar Console uses AI-powered repo automation to go from feature request to production in hours. Open an issue and watch the magic happen.',
18-
'notFound.requestFeature': 'Request this feature',
15+
'notFound.description': "doesn't exist yet — but it could!",
16+
'notFound.ctaTitle': 'Ship it in hours, not months',
17+
'notFound.ctaDescription': 'KubeStellar Console uses AI-powered repo automation to go from feature request to production in hours. Open an issue and watch the magic happen.',
18+
'notFound.ctaButton': 'Request this feature',
1919
'notFound.popularPages': 'Popular pages',
2020
'notFound.goBack': 'Go back',
2121
'notFound.home': 'Home',
22-
'notFound.quickLinks.dashboard': 'Dashboard',
23-
'notFound.quickLinks.clusters': 'Clusters',
24-
'notFound.quickLinks.compliance': 'Compliance',
25-
'notFound.quickLinks.deploy': 'Deploy',
26-
'notFound.quickLinks.marketplace': 'Marketplace',
27-
'notFound.quickLinks.cost': 'Cost',
22+
'quickLinks.dashboard': 'Dashboard',
23+
'quickLinks.clusters': 'Clusters',
24+
'quickLinks.compliance': 'Compliance',
25+
'quickLinks.deploy': 'Deploy',
26+
'quickLinks.marketplace': 'Marketplace',
27+
'quickLinks.cost': 'Cost',
2828
}
2929
return map[key] || key
3030
},

web/src/components/NotFound.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ const NOT_FOUND_COMPASS_STYLE_1: CSSProperties = { animationDuration: '8s' }
2323

2424

2525
const QUICK_LINKS = [
26-
{ labelKey: 'notFound.quickLinks.dashboard', path: ROUTES.HOME, icon: LayoutDashboard },
27-
{ labelKey: 'notFound.quickLinks.clusters', path: ROUTES.CLUSTERS, icon: Server },
28-
{ labelKey: 'notFound.quickLinks.compliance', path: ROUTES.COMPLIANCE, icon: Shield },
29-
{ labelKey: 'notFound.quickLinks.deploy', path: ROUTES.DEPLOY, icon: Zap },
30-
{ labelKey: 'notFound.quickLinks.marketplace', path: ROUTES.MARKETPLACE, icon: Rocket },
31-
{ labelKey: 'notFound.quickLinks.cost', path: ROUTES.COST, icon: Sparkles },
26+
{ labelKey: 'quickLinks.dashboard', path: ROUTES.HOME, icon: LayoutDashboard },
27+
{ labelKey: 'quickLinks.clusters', path: ROUTES.CLUSTERS, icon: Server },
28+
{ labelKey: 'quickLinks.compliance', path: ROUTES.COMPLIANCE, icon: Shield },
29+
{ labelKey: 'quickLinks.deploy', path: ROUTES.DEPLOY, icon: Zap },
30+
{ labelKey: 'quickLinks.marketplace', path: ROUTES.MARKETPLACE, icon: Rocket },
31+
{ labelKey: 'quickLinks.cost', path: ROUTES.COST, icon: Sparkles },
3232
] as const
3333

3434
export default function NotFound() {
@@ -67,18 +67,18 @@ export default function NotFound() {
6767
</h1>
6868
<p className="text-muted-foreground text-base leading-relaxed">
6969
<code className="px-2 py-0.5 bg-zinc-800 rounded text-sm text-purple-300">{path}</code>
70-
{' '}{t('notFound.pathDoesNotExist')}
70+
{' '}{t('notFound.description')}
7171
</p>
7272
</div>
7373

7474
{/* Feature request CTA */}
7575
<div className="bg-linear-to-br from-purple-500/10 to-blue-500/10 border border-purple-500/20 rounded-xl p-5 space-y-3">
7676
<div className="flex items-center justify-center gap-2 text-purple-300">
7777
<Sparkles className="w-4 h-4" />
78-
<span className="text-sm font-semibold">{t('notFound.shipFast')}</span>
78+
<span className="text-sm font-semibold">{t('notFound.ctaTitle')}</span>
7979
</div>
8080
<p className="text-muted-foreground text-sm leading-relaxed">
81-
{t('notFound.aiAutomation')}
81+
{t('notFound.ctaDescription')}
8282
</p>
8383
<a
8484
href={featureRequestUrl}
@@ -87,7 +87,7 @@ export default function NotFound() {
8787
className="inline-flex items-center gap-2 px-5 py-2.5 bg-purple-600 hover:bg-purple-500 text-white text-sm font-medium rounded-lg transition-colors"
8888
>
8989
<MessageSquarePlus className="w-4 h-4" />
90-
{t('notFound.requestFeature')}
90+
{t('notFound.ctaButton')}
9191
</a>
9292
</div>
9393

0 commit comments

Comments
 (0)