Skip to content

Extract hardcoded user-facing strings to i18n translation keys#3789

Merged
clubanderson merged 3 commits intomainfrom
copilot/auto-qa-extract-hardcoded-strings-again
Mar 28, 2026
Merged

Extract hardcoded user-facing strings to i18n translation keys#3789
clubanderson merged 3 commits intomainfrom
copilot/auto-qa-extract-hardcoded-strings-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 28, 2026

25+ hardcoded JSX strings identified by Auto-QA were not routed through the existing react-i18next translation system, making them untranslatable.

📌 Fixes


📝 Summary of Changes

Extracts all flagged hardcoded strings into web/src/locales/en/common.json and replaces inline text with t() calls across 11 components. No new i18n infrastructure — uses the existing useTranslation hook already present in most files.


Changes Made

  • Added translation keys to common.json in existing sections (gpu, common, settings.localClusters) and new drilldown subsections (kustomization, policy, nodeDetail, alertDetail, buildpack)
  • Added history.configurationUpdated key; renamed unused _tt in CardHistory.tsx and CardConfigModal.tsx
  • Added useTranslation import + hook to BuildpackDrillDown.tsx (was missing entirely)
  • Replaced hardcoded option labels (Custom, Health, Provider) in FilterTabs.tsx
  • Replaced hardcoded strings in GPUDetailModal, NamespaceResources, LocalClustersSection
  • Replaced primary + secondary hardcoded strings in all four drilldown views (KustomizationDrillDown, PolicyDrillDown, NodeDrillDown, AlertDrillDown, BuildpackDrillDown)

Pattern applied consistently:

// Before
<p>No builds found</p>

// After
<p>{t('drilldown.buildpack.noBuilds')}</p>

Checklist

  • I used a coding agent (Claude Code, Copilot, Gemini, or Codex) to generate/review this code
  • I have reviewed the project's contribution guidelines
  • New cards target console-marketplace, not this repo
  • isDemoData is wired correctly (cards show Demo badge when using demo data)
  • I have written unit tests for the changes (if applicable)
  • I have tested the changes locally and ensured they work as expected
  • All commits are signed with DCO (git commit -s)

Screenshots or Logs (if applicable)

N/A — string extraction only; no visual changes.


👀 Reviewer Notes

All lint errors in modified files (AlertDrillDown, KustomizationDrillDown, LocalClustersSection) are pre-existing react-hooks/immutability violations unrelated to this PR.


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@kubestellar-prow kubestellar-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 28, 2026
Copilot AI linked an issue Mar 28, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 28, 2026

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit b8e3eba
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69c850797a49fd0008c57e75
😎 Deploy Preview https://deploy-preview-3789.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.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @Copilot — 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 github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 28, 2026
@kubestellar-prow kubestellar-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 28, 2026
@clubanderson clubanderson changed the title [WIP] Extract hardcoded user-facing strings for localization support 🐛 Extract hardcoded user-facing strings for localization support Mar 28, 2026
@clubanderson clubanderson removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2026
@clubanderson clubanderson marked this pull request as ready for review March 28, 2026 13:56
Copilot AI review requested due to automatic review settings March 28, 2026 13:56
@kubestellar-prow kubestellar-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@clubanderson clubanderson removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2026
@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Mar 28, 2026
@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 ask for approval from clubanderson. 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 github-actions bot removed the dco-signoff: no Indicates the PR's author has not signed the DCO. label Mar 28, 2026
@kubestellar-prow kubestellar-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 28, 2026
@github-actions github-actions bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Mar 28, 2026
Copilot AI changed the title 🐛 Extract hardcoded user-facing strings for localization support Extract hardcoded user-facing strings to i18n translation keys Mar 28, 2026
Copilot AI requested a review from clubanderson March 28, 2026 14:07
@github-actions github-actions bot mentioned this pull request Mar 28, 2026
Copilot AI and others added 3 commits March 28, 2026 22:59
Fixes #438 - extracts 25+ hardcoded strings from JSX components into the
existing react-i18next translation system.

Signed-off-by: GitHub Copilot <copilot@github.com>

Agent-Logs-Url: https://github.com/kubestellar/console/sessions/447ea707-f1fe-4a7a-9934-2cf768590425

Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Two strings were missed in the initial extraction:
- "Optimization recommendations" -> t('drilldown.buildpack.optimizationRecommendations')
- "Click \"Analyze Buildpack\"..." -> t('drilldown.buildpack.clickAnalyze')

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@clubanderson clubanderson force-pushed the copilot/auto-qa-extract-hardcoded-strings-again branch from acc7f0a to b8e3eba Compare March 28, 2026 22:04
@kubestellar-prow kubestellar-prow bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Mar 28, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • 54b15a4 Initial plan
  • b8e3eba fix: extract remaining hardcoded strings in BuildpackDrillDown
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@clubanderson clubanderson merged commit 94f98b9 into main Mar 28, 2026
2 of 3 checks passed
@kubestellar-prow kubestellar-prow bot deleted the copilot/auto-qa-extract-hardcoded-strings-again branch March 28, 2026 22:04
@github-actions github-actions bot added dco-signoff: yes Indicates the PR's author has signed the DCO. and removed dco-signoff: no Indicates the PR's author has not signed the DCO. labels Mar 28, 2026
@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

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

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Auto-QA] Hardcoded user-facing strings need extraction

3 participants