feat(app-defaults): add localized catalog entity header layout - #4874
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
PR Summary by QodoLocalize catalog entity header tabs and groups
AI Description
Diagram
High-Level Assessment
Files changed (37)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4874 +/- ##
==========================================
- Coverage 63.69% 63.64% -0.05%
==========================================
Files 2696 2700 +4
Lines 107465 107572 +107
Branches 30084 30114 +30
==========================================
+ Hits 68451 68469 +18
- Misses 37246 37335 +89
Partials 1768 1768
*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:
|
Code Review by Qodo
1. Minor upgrades break consumer builds
|
|
Important The |
Ship `catalogModule` in app-defaults, a catalog plugin module that replaces the entity page header layout with `LocalizedEntityHeaderLayout` and localizes the catalog tab and group titles. Titles are looked up dynamically by their English label under `catalog.entityTabs.*` and `catalog.entityTabGroups.*`, so localizing a new title only needs a translation entry. app-react now exports `appReactTranslationRef` / `appReactTranslations` (catalog tab/group title translations for de, es, fr, it, ja) and the `EntityHeaderBui` / `EntityContextMenu` components via a new `/alpha` entry point. BREAKING: the app-defaults translation ref export was renamed from `translationRef` to `appDefaultsTranslationRef`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MQxi5MDUWcL4rcGwBefNE Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
7eb29d8 to
dac7ba1
Compare
Add unit tests for LocalizedEntityHeaderLayout (tab/group title localization, namespace fallback, dotted-label keys, prop pass-through) and catalogModule (module wiring), plus a Playwright e2e test that verifies the entity page tab titles are localized per locale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MQxi5MDUWcL4rcGwBefNE Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
dac7ba1 to
86364a9
Compare
|
karthikjeeyar
left a comment
There was a problem hiding this comment.
Changes looks good to me, Tested locally.
/lgtm
…t-developer#4874) * feat(app-defaults): add localized catalog entity header layout Ship `catalogModule` in app-defaults, a catalog plugin module that replaces the entity page header layout with `LocalizedEntityHeaderLayout` and localizes the catalog tab and group titles. Titles are looked up dynamically by their English label under `catalog.entityTabs.*` and `catalog.entityTabGroups.*`, so localizing a new title only needs a translation entry. app-react now exports `appReactTranslationRef` / `appReactTranslations` (catalog tab/group title translations for de, es, fr, it, ja) and the `EntityHeaderBui` / `EntityContextMenu` components via a new `/alpha` entry point. BREAKING: the app-defaults translation ref export was renamed from `translationRef` to `appDefaultsTranslationRef`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MQxi5MDUWcL4rcGwBefNE Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> * test(app-defaults): add tests for the localized catalog entity header Add unit tests for LocalizedEntityHeaderLayout (tab/group title localization, namespace fallback, dotted-label keys, prop pass-through) and catalogModule (module wiring), plus a Playwright e2e test that verifies the entity page tab titles are localized per locale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016MQxi5MDUWcL4rcGwBefNE Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> --------- Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>



Description
Adds a localized catalog entity header layout to the RHDH app defaults, so the catalog entity page tab and group titles are translated.
app-defaultscatalogModule— a catalog plugin module (pluginId: 'catalog') that contributes anentity-header-layout(LocalizedEntityHeaderLayout). With no filter it renders the header + tab bar for every entity and localizes the tab/group titles. It is registered in the default feature loader.catalog.entityTabs.*andcatalog.entityTabGroups.*keys, so localizing a new title only requires a translation entry — no code change to the layout. Unknown titles (contributed by other plugins) fall back to the English label. Dots in a label are mapped to_to stay a single i18next key.app-reactappReactTranslationRef/appReactTranslations— the translation ref and resource holding the catalog entity tab and group titles (en, de, es, fr, it, ja).EntityHeaderBuiandEntityContextMenu(plus theEntityContextMenuItemDataWithNodetype), extracted here and exported from a new@red-hat-developer-hub/backstage-plugin-app-react/alphaentry point.Breaking
app-defaultstranslation ref export was renamed fromtranslationReftoappDefaultsTranslationRef.Screenshots
Before:
With this PR:
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_016MQxi5MDUWcL4rcGwBefNE