fix(i18n): wire Retry buttons through translation layer in 8 compliance dashboards#13142
Conversation
…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>
✅ Deploy Preview for kubestellarconsole ready!Built without sensitive environment variables
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 @AdeshDeshmukh — thanks for opening this PR!
This is an automated message. |
There was a problem hiding this comment.
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
Retrylabels witht('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. |
| <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> |
There was a problem hiding this comment.
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-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
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. |
9034c71
into
kubestellar:main
✅ Post-Merge Verification: passedCommit: |
…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>
* 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>
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.