Skip to content

fix(i18n): wire Retry buttons through translation layer in 8 compliance dashboards#13142

Merged
kubestellar-hive[bot] merged 1 commit into
kubestellar:mainfrom
AdeshDeshmukh:fix/compliance-dashboard-retry-i18n
May 11, 2026
Merged

fix(i18n): wire Retry buttons through translation layer in 8 compliance dashboards#13142
kubestellar-hive[bot] merged 1 commit into
kubestellar:mainfrom
AdeshDeshmukh:fix/compliance-dashboard-retry-i18n

Conversation

@AdeshDeshmukh
Copy link
Copy Markdown
Contributor

Eight compliance dashboards had a hardcoded Retry button in their error state — BAA, GxP, HIPAA, License Compliance, OIDC, RBAC Audit, Session Management, and Signing Status. Every other dashboard in the project that shows a Retry button goes through t(), these eight just got missed.

Added useTranslation import and hook to each component, wrapped the button text in t('common.retry', 'Retry'). No new translation keys needed — common.retry already exists. Same three-line change per file, same pattern as every other dashboard in the codebase.

…ce dashboards

Eight compliance dashboards had a hardcoded Retry button in their
error state — BAA, GxP, HIPAA, License Compliance, OIDC, RBAC
Audit, Session Management, and Signing Status. Every other dashboard
in the project that shows a Retry button goes through t(), these
eight just got missed.

Added useTranslation import and hook to each component, wrapped the
button text in t('common.retry', 'Retry'). No new translation keys
needed — common.retry already exists. Same three-line change per
file, same pattern as every other dashboard in the codebase.

Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>
Copilot AI review requested due to automatic review settings May 11, 2026 15:58
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label May 11, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 11, 2026

Deploy Preview for kubestellarconsole ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a7147e3
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a01fc95ea18900008b5fed3
😎 Deploy Preview https://deploy-preview-13142.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

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 Hey @AdeshDeshmukh — 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.

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.

Pull request overview

Wires previously hardcoded “Retry” button labels in eight compliance dashboard error states through the i18n translation layer to align with the rest of the UI and support localization.

Changes:

  • Added useTranslation() to each affected dashboard component.
  • Replaced hardcoded Retry labels with t('common.retry', 'Retry') in error-state retry buttons.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
web/src/components/compliance/SigningStatusDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/SessionDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/RBACAuditDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/OIDCDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/LicenseComplianceDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/HIPAADashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/GxPDashboard.tsx Uses i18n for the error-state Retry button label.
web/src/components/compliance/BAADashboard.tsx Uses i18n for the error-state Retry button label.
Comment on lines 106 to 110
<div className="p-6 text-center">
<XCircle className="w-12 h-12 text-red-400 mx-auto mb-3" />
<p className="text-red-300 mb-4">{error}</p>
<button onClick={fetchData} className="px-4 py-2 bg-purple-600 hover:bg-purple-700 rounded-lg text-sm">Retry</button>
<button onClick={fetchData} className="px-4 py-2 bg-purple-600 hover:bg-purple-700 rounded-lg text-sm">{t('common.retry', 'Retry')}</button>
</div>
Copy link
Copy Markdown
Contributor

@kubestellar-hive kubestellar-hive Bot left a comment

Choose a reason for hiding this comment

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

Clean, consistent fix across all 8 compliance dashboards. The pattern is identical to what every other dashboard in the codebase does — import useTranslation, call the hook, wrap the button text in t('common.retry', 'Retry'). Uses an existing translation key so no new locale entries needed.

CI is green on all blocking checks. LGTM 👍

@kubestellar-prow
Copy link
Copy Markdown
Contributor

@kubestellar-hive[bot]: changing LGTM is restricted to collaborators

Details

In response to this:

Clean, consistent fix across all 8 compliance dashboards. The pattern is identical to what every other dashboard in the codebase does — import useTranslation, call the hook, wrap the button text in t('common.retry', 'Retry'). Uses an existing translation key so no new locale entries needed.

CI is green on all blocking checks. LGTM 👍

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.

@kubestellar-hive kubestellar-hive Bot merged commit 9034c71 into kubestellar:main May 11, 2026
38 of 40 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

✅ Post-Merge Verification: passed

Commit: 9034c713717a51598ed3c83653acfcba9c8b24cd
Specs run: smoke.spec.ts
Report: https://github.com/kubestellar/console/actions/runs/25682826628

kubestellar-hive Bot added a commit that referenced this pull request May 11, 2026
…try buttons (#13145)

The test was looking for hardcoded 'Retry' text but PR #13142 wired
Retry buttons through the translation layer. Update the test to work
with the i18n-aware component.

Fixes #13144

Signed-off-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kubestellar-hive Bot pushed a commit that referenced this pull request May 13, 2026
* fix(i18n): wrap drilldown toast messages in translation layer

Five showToast calls in BuildpackDrillDown and YAMLDrillDown were
shipping raw English strings — fetch failures, copy errors, and
download errors — while both components already import useTranslation
and use t() throughout their JSX. The toast messages were simply
missed during the original i18n pass.

Wrapped each in t() with English fallbacks, added five new keys
under the existing drilldown.* namespace in common.json. Same
pattern as PRs #12984, #13024, and #13142.

Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>

* fix(i18n): remove unused interpolation placeholder from downloadError key

The downloadError key had {{error}} interpolation but the t() call
passes the full error message as a fallback string, not as an
interpolation value. Removed the placeholder so the key renders
correctly once non-English translations land.

Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>

* fix(i18n): use proper interpolation for downloadError toast

Pass the dynamic error detail as an interpolation value instead of
embedding it in the fallback string. This preserves the error detail
in both the translated string and when the key resolves.

Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>

---------

Signed-off-by: AdeshDeshmukh <adeshkd123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants