fix(homepage): fix missing translations for homepage card widgets#3575
fix(homepage): fix missing translations for homepage card widgets#3575debsmita1 wants to merge 4 commits into
Conversation
Changed Packages
|
6cbef86 to
d0298b1
Compare
d0298b1 to
1c6b97e
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3575 +/- ##
==========================================
- Coverage 54.28% 54.11% -0.18%
==========================================
Files 2347 2301 -46
Lines 89650 87955 -1695
Branches 25020 24541 -479
==========================================
- Hits 48666 47594 -1072
+ Misses 39456 38797 -659
- Partials 1528 1564 +36
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
32935be to
31e45c4
Compare
31e45c4 to
d698e30
Compare
|
its-mitesh-kumar
left a comment
There was a problem hiding this comment.
Hey @debsmita1, nice work on the i18n coverage and tests!
Two concerns about the updateWidgetComponentData approach:
-
Coupling to Backstage internals — We're directly mutating
__backstage_data, an undocumented internal of@backstage/core-plugin-api. If upstream renames/restructures this, our translations silently break with zero errors. -
Magic string sync —
widgetTranslationKeysByNamemaps names like'Red Hat Developer Hub - Onboarding'to translation keys. These must stay manually in sync withparams.nameinhomePageCards.tsx. A rename = silent i18n breakage.
Upstream proposal: The root cause is HomePageWidgetBlueprint only accepts plain string for title. Could we push upstream for a titleKey/descriptionKey field, where the renderer just calls t(titleKey) at render time? No internals mutation needed:
// Proposed upstream API
HomePageWidgetBlueprint.make({
params: {
titleKey: 'recentlyVisited.title',
descriptionKey: 'recentlyVisited.description',
}
})


Hey, I just made a Pull Request!
Resolves:
https://redhat.atlassian.net/browse/RHDHBUGS-3271
Screen.Recording.2026-06-25.at.4.26.37.PM.mov
✔️ Checklist