From 78d96997ced1a38956950ea1e03d904ee4ee29c8 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 3 Oct 2025 17:04:17 +0530 Subject: [PATCH 1/9] feat(localization): add localization support for entityTabs Signed-off-by: its-mitesh-kumar --- dynamic-plugins.default.yaml | 4 ++ .../components/DynamicRoot/DynamicRoot.tsx | 4 +- .../catalog/EntityPage/DynamicEntityTab.tsx | 1 + .../catalog/EntityPage/EntityPage.tsx | 49 +++++++++++++++---- packages/app/src/translations/rhdh/de.ts | 2 + packages/app/src/translations/rhdh/es.ts | 2 + packages/app/src/translations/rhdh/fr.ts | 2 + packages/app/src/translations/rhdh/it.ts | 2 + packages/app/src/translations/rhdh/ref.ts | 3 ++ .../utils/dynamicUI/extractDynamicConfig.ts | 2 + packages/plugin-utils/src/types.ts | 2 +- 11 files changed, 60 insertions(+), 13 deletions(-) diff --git a/dynamic-plugins.default.yaml b/dynamic-plugins.default.yaml index 504cfdc23e..2960afe0f8 100644 --- a/dynamic-plugins.default.yaml +++ b/dynamic-plugins.default.yaml @@ -1313,6 +1313,9 @@ plugins: dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-orchestrator: + translationResources: + - importName: rhdhTranslations + ref: rhdhTranslationRef appIcons: - importName: OrchestratorIcon name: orchestratorIcon @@ -1326,6 +1329,7 @@ plugins: entityTabs: - path: /workflows title: Workflows + titleKey: app.entityPage.workflows.title mountPoint: entity.page.workflows mountPoints: - mountPoint: entity.page.workflows/cards diff --git a/packages/app/src/components/DynamicRoot/DynamicRoot.tsx b/packages/app/src/components/DynamicRoot/DynamicRoot.tsx index a9e8b98c4f..4e394dccf8 100644 --- a/packages/app/src/components/DynamicRoot/DynamicRoot.tsx +++ b/packages/app/src/components/DynamicRoot/DynamicRoot.tsx @@ -443,14 +443,14 @@ export const DynamicRoot = ({ }, []); const entityTabOverrides = entityTabs.reduce( - (acc, { path, title, mountPoint, scope, priority }) => { + (acc, { path, title, titleKey, mountPoint, scope, priority }) => { if (acc[path]) { // eslint-disable-next-line no-console console.warn( `Plugin ${scope} is not configured properly: a tab has already been configured for "${path}", ignoring entry with title: "${title}" and mountPoint: "${mountPoint}"`, ); } else { - acc[path] = { title, mountPoint, priority }; + acc[path] = { title, titleKey, mountPoint, priority }; } return acc; }, diff --git a/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx b/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx index 430923e448..e522ee739f 100644 --- a/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx +++ b/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx @@ -12,6 +12,7 @@ import Grid from '../Grid'; export type DynamicEntityTabProps = { path: string; title: string; + titleKey?: string; mountPoint: string; if?: (entity: Entity) => boolean; children?: React.ReactNode; diff --git a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx index 21e285591a..ed2cee7f92 100644 --- a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx @@ -1,25 +1,40 @@ +import { useTranslation } from '../../../hooks/useTranslation'; import { ContextMenuAwareEntityLayout } from './ContextMenuAwareEntityLayout'; import { tabChildren, tabRules } from './defaultTabs'; import { dynamicEntityTab, DynamicEntityTabProps } from './DynamicEntityTab'; import { mergeTabs } from './utils'; -/** - * Displays the tabs and content for a catalog entity - * *Note:* do not convert convert this to a component or wrap the return value - * @param entityTabOverrides - * @returns - */ -export const entityPage = ( +const EntityPageWithTranslation = ({ + entityTabOverrides, +}: { entityTabOverrides: Record< string, Omit - > = {}, -) => { + >; +}) => { + const { t } = useTranslation(); + + const getTranslatedTitle = (title: string, titleKey?: string) => { + if (!titleKey) { + return title; + } + const translatedTitle = t(titleKey as any, {}); + if (translatedTitle !== title) { + return translatedTitle; + } + return title; + }; + return ( {mergeTabs(entityTabOverrides).map(([path, config]) => { - return dynamicEntityTab({ + const translatedConfig = { ...config, + title: getTranslatedTitle(config.title, config.titleKey), + }; + + return dynamicEntityTab({ + ...translatedConfig, path, ...(tabRules[path] ? tabRules[path] : {}), ...(tabChildren[path] ? tabChildren[path] : {}), @@ -28,3 +43,17 @@ export const entityPage = ( ); }; + +/** + * Displays the tabs and content for a catalog entity + * @param entityTabOverrides + * @returns + */ +export const entityPage = ( + entityTabOverrides: Record< + string, + Omit + > = {}, +) => { + return ; +}; diff --git a/packages/app/src/translations/rhdh/de.ts b/packages/app/src/translations/rhdh/de.ts index 56373336fb..2aa4b450df 100644 --- a/packages/app/src/translations/rhdh/de.ts +++ b/packages/app/src/translations/rhdh/de.ts @@ -43,6 +43,8 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrator', 'menuItem.adoptionInsights': 'Einführungseinblicke', + 'app.entityPage.workflows.title': 'Workflows', + 'sidebar.menu': 'Menü', 'sidebar.home': 'Startseite', 'sidebar.homeLogo': 'Startseite-Logo', diff --git a/packages/app/src/translations/rhdh/es.ts b/packages/app/src/translations/rhdh/es.ts index 69b02c99e8..acd8a7919a 100644 --- a/packages/app/src/translations/rhdh/es.ts +++ b/packages/app/src/translations/rhdh/es.ts @@ -43,6 +43,8 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orquestador', 'menuItem.adoptionInsights': 'Insights de adopción', + 'app.entityPage.workflows.title': 'Flujos de trabajo', + 'sidebar.menu': 'Menú', 'sidebar.home': 'Inicio', 'sidebar.homeLogo': 'Logo de inicio', diff --git a/packages/app/src/translations/rhdh/fr.ts b/packages/app/src/translations/rhdh/fr.ts index b78fe3e8ad..9033f904d2 100644 --- a/packages/app/src/translations/rhdh/fr.ts +++ b/packages/app/src/translations/rhdh/fr.ts @@ -43,6 +43,8 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrateur', 'menuItem.adoptionInsights': "Insights d'adoption", + 'app.entityPage.workflows.title': 'Flux de travail', + 'sidebar.menu': 'Menu', 'sidebar.home': 'Accueil', 'sidebar.homeLogo': "Logo d'accueil", diff --git a/packages/app/src/translations/rhdh/it.ts b/packages/app/src/translations/rhdh/it.ts index b6c64a7927..bcb4f141cd 100644 --- a/packages/app/src/translations/rhdh/it.ts +++ b/packages/app/src/translations/rhdh/it.ts @@ -43,6 +43,8 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestratore', 'menuItem.adoptionInsights': 'Insights di adozione', + 'app.entityPage.workflows.title': 'Flussi di lavoro', + 'sidebar.menu': 'Menu', 'sidebar.home': 'Home', 'sidebar.homeLogo': 'Logo principale', diff --git a/packages/app/src/translations/rhdh/ref.ts b/packages/app/src/translations/rhdh/ref.ts index 1a2d34ccbc..4516ecf86a 100644 --- a/packages/app/src/translations/rhdh/ref.ts +++ b/packages/app/src/translations/rhdh/ref.ts @@ -131,6 +131,9 @@ export const rhdhMessages = { diagram: { title: 'System Diagram', }, + workflows: { + title: 'Workflows', + }, }, userSettings: { infoCard: { diff --git a/packages/app/src/utils/dynamicUI/extractDynamicConfig.ts b/packages/app/src/utils/dynamicUI/extractDynamicConfig.ts index 76f5cf7f33..df807c0497 100644 --- a/packages/app/src/utils/dynamicUI/extractDynamicConfig.ts +++ b/packages/app/src/utils/dynamicUI/extractDynamicConfig.ts @@ -117,6 +117,7 @@ type EntityTab = { mountPoint: string; path: string; title: string; + titleKey?: string; pariority?: number; }; @@ -125,6 +126,7 @@ type EntityTabEntry = { mountPoint: string; path: string; title: string; + titleKey?: string; priority?: number; }; diff --git a/packages/plugin-utils/src/types.ts b/packages/plugin-utils/src/types.ts index 4bb7de80bf..f5afff0ac3 100644 --- a/packages/plugin-utils/src/types.ts +++ b/packages/plugin-utils/src/types.ts @@ -78,7 +78,7 @@ export type MountPoint = { export type EntityTabOverrides = Record< string, - { title: string; mountPoint: string; priority?: number } + { title: string; titleKey?: string; mountPoint: string; priority?: number } >; export type MountPoints = Record; From feb3411c9cc57b49375dfe73f60db998398c7c24 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 3 Oct 2025 18:49:38 +0530 Subject: [PATCH 2/9] translating default tab Signed-off-by: its-mitesh-kumar --- .../catalog/EntityPage/defaultTabs.tsx | 17 +++++++- packages/app/src/translations/rhdh/de.ts | 16 ++++++- packages/app/src/translations/rhdh/es.ts | 16 ++++++- packages/app/src/translations/rhdh/fr.ts | 16 ++++++- packages/app/src/translations/rhdh/it.ts | 16 ++++++- packages/app/src/translations/rhdh/ref.ts | 42 +++++++++++++++++++ 6 files changed, 118 insertions(+), 5 deletions(-) diff --git a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx index fda8653c69..b8247ec773 100644 --- a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx +++ b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx @@ -14,66 +14,81 @@ import { OverviewTabContent } from './OverviewTabContent'; */ export const defaultTabs: Record< string, - Omit + { title: string; titleKey?: string; mountPoint: string; priority?: number } > = { '/': { title: 'Overview', + titleKey: 'app.entityPage.overview.title', mountPoint: 'entity.page.overview', }, '/topology': { title: 'Topology', + titleKey: 'app.entityPage.topology.title', mountPoint: 'entity.page.topology', }, '/issues': { title: 'Issues', + titleKey: 'app.entityPage.issues.title', mountPoint: 'entity.page.issues', }, '/pr': { title: 'Pull/Merge Requests', + titleKey: 'app.entityPage.pullRequests.title', mountPoint: 'entity.page.pull-requests', }, '/ci': { title: 'CI', + titleKey: 'app.entityPage.ci.title', mountPoint: 'entity.page.ci', }, '/cd': { title: 'CD', + titleKey: 'app.entityPage.cd.title', mountPoint: 'entity.page.cd', }, '/kubernetes': { title: 'Kubernetes', + titleKey: 'app.entityPage.kubernetes.title', mountPoint: 'entity.page.kubernetes', }, '/image-registry': { title: 'Image Registry', + titleKey: 'app.entityPage.imageRegistry.title', mountPoint: 'entity.page.image-registry', }, '/monitoring': { title: 'Monitoring', + titleKey: 'app.entityPage.monitoring.title', mountPoint: 'entity.page.monitoring', }, '/lighthouse': { title: 'Lighthouse', + titleKey: 'app.entityPage.lighthouse.title', mountPoint: 'entity.page.lighthouse', }, '/api': { title: 'Api', + titleKey: 'app.entityPage.api.title', mountPoint: 'entity.page.api', }, '/dependencies': { title: 'Dependencies', + titleKey: 'app.entityPage.dependencies.title', mountPoint: 'entity.page.dependencies', }, '/docs': { title: 'Docs', + titleKey: 'app.entityPage.docs.title', mountPoint: 'entity.page.docs', }, '/definition': { title: 'Definition', + titleKey: 'app.entityPage.definition.title', mountPoint: 'entity.page.definition', }, '/system': { title: 'Diagram', + titleKey: 'app.entityPage.diagram.title', mountPoint: 'entity.page.diagram', }, }; diff --git a/packages/app/src/translations/rhdh/de.ts b/packages/app/src/translations/rhdh/de.ts index 2aa4b450df..60df71a0a4 100644 --- a/packages/app/src/translations/rhdh/de.ts +++ b/packages/app/src/translations/rhdh/de.ts @@ -43,6 +43,21 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrator', 'menuItem.adoptionInsights': 'Einführungseinblicke', + 'app.entityPage.overview.title': 'Übersicht', + 'app.entityPage.topology.title': 'Topologie', + 'app.entityPage.issues.title': 'Issues', + 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'app.entityPage.ci.title': 'CI', + 'app.entityPage.cd.title': 'CD', + 'app.entityPage.kubernetes.title': 'Kubernetes', + 'app.entityPage.imageRegistry.title': 'Image Registry', + 'app.entityPage.monitoring.title': 'Überwachung', + 'app.entityPage.lighthouse.title': 'Lighthouse', + 'app.entityPage.api.title': 'API', + 'app.entityPage.dependencies.title': 'Abhängigkeiten', + 'app.entityPage.docs.title': 'Dokumentation', + 'app.entityPage.definition.title': 'Definition', + 'app.entityPage.diagram.title': 'Systemdiagramm', 'app.entityPage.workflows.title': 'Workflows', 'sidebar.menu': 'Menü', @@ -90,7 +105,6 @@ export default createTranslationMessages({ 'app.learningPaths.title': 'Lernpfade', 'app.learningPaths.error.title': 'Daten konnten nicht abgerufen werden.', 'app.learningPaths.error.unknownError': 'Unbekannter Fehler', - 'app.entityPage.diagram.title': 'Systemdiagramm', 'app.userSettings.infoCard.title': 'RHDH-Metadaten', 'app.userSettings.infoCard.metadataCopied': 'Metadaten in die Zwischenablage kopiert', diff --git a/packages/app/src/translations/rhdh/es.ts b/packages/app/src/translations/rhdh/es.ts index acd8a7919a..27ae6c675c 100644 --- a/packages/app/src/translations/rhdh/es.ts +++ b/packages/app/src/translations/rhdh/es.ts @@ -43,6 +43,21 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orquestador', 'menuItem.adoptionInsights': 'Insights de adopción', + 'app.entityPage.overview.title': 'Resumen', + 'app.entityPage.topology.title': 'Topología', + 'app.entityPage.issues.title': 'Problemas', + 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'app.entityPage.ci.title': 'CI', + 'app.entityPage.cd.title': 'CD', + 'app.entityPage.kubernetes.title': 'Kubernetes', + 'app.entityPage.imageRegistry.title': 'Registro de Imágenes', + 'app.entityPage.monitoring.title': 'Monitoreo', + 'app.entityPage.lighthouse.title': 'Lighthouse', + 'app.entityPage.api.title': 'API', + 'app.entityPage.dependencies.title': 'Dependencias', + 'app.entityPage.docs.title': 'Documentación', + 'app.entityPage.definition.title': 'Definición', + 'app.entityPage.diagram.title': 'Diagrama del Sistema', 'app.entityPage.workflows.title': 'Flujos de trabajo', 'sidebar.menu': 'Menú', @@ -91,7 +106,6 @@ export default createTranslationMessages({ 'app.learningPaths.title': 'Rutas de aprendizaje', 'app.learningPaths.error.title': 'No se pudieron obtener los datos.', 'app.learningPaths.error.unknownError': 'Error desconocido', - 'app.entityPage.diagram.title': 'Diagrama del sistema', 'app.userSettings.infoCard.title': 'Metadatos RHDH', 'app.userSettings.infoCard.metadataCopied': 'Metadatos copiados al portapapeles', diff --git a/packages/app/src/translations/rhdh/fr.ts b/packages/app/src/translations/rhdh/fr.ts index 9033f904d2..e1d88b2390 100644 --- a/packages/app/src/translations/rhdh/fr.ts +++ b/packages/app/src/translations/rhdh/fr.ts @@ -43,6 +43,21 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrateur', 'menuItem.adoptionInsights': "Insights d'adoption", + 'app.entityPage.overview.title': 'Aperçu', + 'app.entityPage.topology.title': 'Topologie', + 'app.entityPage.issues.title': 'Problèmes', + 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'app.entityPage.ci.title': 'CI', + 'app.entityPage.cd.title': 'CD', + 'app.entityPage.kubernetes.title': 'Kubernetes', + 'app.entityPage.imageRegistry.title': "Registre d'Images", + 'app.entityPage.monitoring.title': 'Surveillance', + 'app.entityPage.lighthouse.title': 'Lighthouse', + 'app.entityPage.api.title': 'API', + 'app.entityPage.dependencies.title': 'Dépendances', + 'app.entityPage.docs.title': 'Documentation', + 'app.entityPage.definition.title': 'Définition', + 'app.entityPage.diagram.title': 'Diagramme du Système', 'app.entityPage.workflows.title': 'Flux de travail', 'sidebar.menu': 'Menu', @@ -91,7 +106,6 @@ export default createTranslationMessages({ 'app.learningPaths.title': "Parcours d'apprentissage", 'app.learningPaths.error.title': 'Impossible de récupérer les données.', 'app.learningPaths.error.unknownError': 'Erreur inconnue', - 'app.entityPage.diagram.title': 'Diagramme système', 'app.userSettings.infoCard.title': 'Métadonnées RHDH', 'app.userSettings.infoCard.metadataCopied': 'Métadonnées copiées dans le presse-papiers', diff --git a/packages/app/src/translations/rhdh/it.ts b/packages/app/src/translations/rhdh/it.ts index bcb4f141cd..d64d4794e7 100644 --- a/packages/app/src/translations/rhdh/it.ts +++ b/packages/app/src/translations/rhdh/it.ts @@ -43,6 +43,21 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestratore', 'menuItem.adoptionInsights': 'Insights di adozione', + 'app.entityPage.overview.title': 'Panoramica', + 'app.entityPage.topology.title': 'Topologia', + 'app.entityPage.issues.title': 'Problemi', + 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'app.entityPage.ci.title': 'CI', + 'app.entityPage.cd.title': 'CD', + 'app.entityPage.kubernetes.title': 'Kubernetes', + 'app.entityPage.imageRegistry.title': 'Registro Immagini', + 'app.entityPage.monitoring.title': 'Monitoraggio', + 'app.entityPage.lighthouse.title': 'Lighthouse', + 'app.entityPage.api.title': 'API', + 'app.entityPage.dependencies.title': 'Dipendenze', + 'app.entityPage.docs.title': 'Documentazione', + 'app.entityPage.definition.title': 'Definizione', + 'app.entityPage.diagram.title': 'Diagramma del Sistema', 'app.entityPage.workflows.title': 'Flussi di lavoro', 'sidebar.menu': 'Menu', @@ -90,7 +105,6 @@ export default createTranslationMessages({ 'app.learningPaths.title': 'Percorsi di apprendimento', 'app.learningPaths.error.title': 'Impossibile recuperare i dati.', 'app.learningPaths.error.unknownError': 'Errore sconosciuto', - 'app.entityPage.diagram.title': 'Diagramma di sistema', 'app.userSettings.infoCard.title': 'Metadati RHDH', 'app.userSettings.infoCard.metadataCopied': 'Metadati copiati negli appunti', diff --git a/packages/app/src/translations/rhdh/ref.ts b/packages/app/src/translations/rhdh/ref.ts index 4516ecf86a..aaee596c86 100644 --- a/packages/app/src/translations/rhdh/ref.ts +++ b/packages/app/src/translations/rhdh/ref.ts @@ -128,6 +128,48 @@ export const rhdhMessages = { }, }, entityPage: { + overview: { + title: 'Overview', + }, + topology: { + title: 'Topology', + }, + issues: { + title: 'Issues', + }, + pullRequests: { + title: 'Pull/Merge Requests', + }, + ci: { + title: 'CI', + }, + cd: { + title: 'CD', + }, + kubernetes: { + title: 'Kubernetes', + }, + imageRegistry: { + title: 'Image Registry', + }, + monitoring: { + title: 'Monitoring', + }, + lighthouse: { + title: 'Lighthouse', + }, + api: { + title: 'API', + }, + dependencies: { + title: 'Dependencies', + }, + docs: { + title: 'Docs', + }, + definition: { + title: 'Definition', + }, diagram: { title: 'System Diagram', }, From 3a135136de7afc25a9d3a1e5888c06e3c2e0cf2c Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 3 Oct 2025 19:52:32 +0530 Subject: [PATCH 3/9] removing translation ref from default Signed-off-by: its-mitesh-kumar --- dynamic-plugins.default.yaml | 3 --- .../app/src/components/catalog/EntityPage/EntityPage.tsx | 8 ++------ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/dynamic-plugins.default.yaml b/dynamic-plugins.default.yaml index 2960afe0f8..3ebb809ba0 100644 --- a/dynamic-plugins.default.yaml +++ b/dynamic-plugins.default.yaml @@ -1313,9 +1313,6 @@ plugins: dynamicPlugins: frontend: red-hat-developer-hub.backstage-plugin-orchestrator: - translationResources: - - importName: rhdhTranslations - ref: rhdhTranslationRef appIcons: - importName: OrchestratorIcon name: orchestratorIcon diff --git a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx index ed2cee7f92..c907a29429 100644 --- a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx @@ -19,7 +19,7 @@ const EntityPageWithTranslation = ({ return title; } const translatedTitle = t(titleKey as any, {}); - if (translatedTitle !== title) { + if (translatedTitle !== titleKey) { return translatedTitle; } return title; @@ -28,13 +28,9 @@ const EntityPageWithTranslation = ({ return ( {mergeTabs(entityTabOverrides).map(([path, config]) => { - const translatedConfig = { + return dynamicEntityTab({ ...config, title: getTranslatedTitle(config.title, config.titleKey), - }; - - return dynamicEntityTab({ - ...translatedConfig, path, ...(tabRules[path] ? tabRules[path] : {}), ...(tabChildren[path] ? tabChildren[path] : {}), From d2a8b621a370ad94f5ee65d109c0007c55610f62 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 3 Oct 2025 20:03:26 +0530 Subject: [PATCH 4/9] moving prefix of key from app to catalog Signed-off-by: its-mitesh-kumar --- dynamic-plugins.default.yaml | 2 +- .../catalog/EntityPage/defaultTabs.tsx | 30 +++++------ packages/app/src/translations/rhdh/de.ts | 32 ++++++------ packages/app/src/translations/rhdh/es.ts | 32 ++++++------ packages/app/src/translations/rhdh/fr.ts | 32 ++++++------ packages/app/src/translations/rhdh/it.ts | 32 ++++++------ packages/app/src/translations/rhdh/ref.ts | 50 ++++++++++--------- 7 files changed, 106 insertions(+), 104 deletions(-) diff --git a/dynamic-plugins.default.yaml b/dynamic-plugins.default.yaml index 3ebb809ba0..0d17100fe8 100644 --- a/dynamic-plugins.default.yaml +++ b/dynamic-plugins.default.yaml @@ -1326,7 +1326,7 @@ plugins: entityTabs: - path: /workflows title: Workflows - titleKey: app.entityPage.workflows.title + titleKey: catalog.entityPage.workflows.title mountPoint: entity.page.workflows mountPoints: - mountPoint: entity.page.workflows/cards diff --git a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx index b8247ec773..bb495fe08d 100644 --- a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx +++ b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx @@ -18,77 +18,77 @@ export const defaultTabs: Record< > = { '/': { title: 'Overview', - titleKey: 'app.entityPage.overview.title', + titleKey: 'catalog.entityPage.overview.title', mountPoint: 'entity.page.overview', }, '/topology': { title: 'Topology', - titleKey: 'app.entityPage.topology.title', + titleKey: 'catalog.entityPage.topology.title', mountPoint: 'entity.page.topology', }, '/issues': { title: 'Issues', - titleKey: 'app.entityPage.issues.title', + titleKey: 'catalog.entityPage.issues.title', mountPoint: 'entity.page.issues', }, '/pr': { title: 'Pull/Merge Requests', - titleKey: 'app.entityPage.pullRequests.title', + titleKey: 'catalog.entityPage.pullRequests.title', mountPoint: 'entity.page.pull-requests', }, '/ci': { title: 'CI', - titleKey: 'app.entityPage.ci.title', + titleKey: 'catalog.entityPage.ci.title', mountPoint: 'entity.page.ci', }, '/cd': { title: 'CD', - titleKey: 'app.entityPage.cd.title', + titleKey: 'catalog.entityPage.cd.title', mountPoint: 'entity.page.cd', }, '/kubernetes': { title: 'Kubernetes', - titleKey: 'app.entityPage.kubernetes.title', + titleKey: 'catalog.entityPage.kubernetes.title', mountPoint: 'entity.page.kubernetes', }, '/image-registry': { title: 'Image Registry', - titleKey: 'app.entityPage.imageRegistry.title', + titleKey: 'catalog.entityPage.imageRegistry.title', mountPoint: 'entity.page.image-registry', }, '/monitoring': { title: 'Monitoring', - titleKey: 'app.entityPage.monitoring.title', + titleKey: 'catalog.entityPage.monitoring.title', mountPoint: 'entity.page.monitoring', }, '/lighthouse': { title: 'Lighthouse', - titleKey: 'app.entityPage.lighthouse.title', + titleKey: 'catalog.entityPage.lighthouse.title', mountPoint: 'entity.page.lighthouse', }, '/api': { title: 'Api', - titleKey: 'app.entityPage.api.title', + titleKey: 'catalog.entityPage.api.title', mountPoint: 'entity.page.api', }, '/dependencies': { title: 'Dependencies', - titleKey: 'app.entityPage.dependencies.title', + titleKey: 'catalog.entityPage.dependencies.title', mountPoint: 'entity.page.dependencies', }, '/docs': { title: 'Docs', - titleKey: 'app.entityPage.docs.title', + titleKey: 'catalog.entityPage.docs.title', mountPoint: 'entity.page.docs', }, '/definition': { title: 'Definition', - titleKey: 'app.entityPage.definition.title', + titleKey: 'catalog.entityPage.definition.title', mountPoint: 'entity.page.definition', }, '/system': { title: 'Diagram', - titleKey: 'app.entityPage.diagram.title', + titleKey: 'catalog.entityPage.diagram.title', mountPoint: 'entity.page.diagram', }, }; diff --git a/packages/app/src/translations/rhdh/de.ts b/packages/app/src/translations/rhdh/de.ts index 60df71a0a4..df27fbdfc7 100644 --- a/packages/app/src/translations/rhdh/de.ts +++ b/packages/app/src/translations/rhdh/de.ts @@ -43,22 +43,22 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrator', 'menuItem.adoptionInsights': 'Einführungseinblicke', - 'app.entityPage.overview.title': 'Übersicht', - 'app.entityPage.topology.title': 'Topologie', - 'app.entityPage.issues.title': 'Issues', - 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', - 'app.entityPage.ci.title': 'CI', - 'app.entityPage.cd.title': 'CD', - 'app.entityPage.kubernetes.title': 'Kubernetes', - 'app.entityPage.imageRegistry.title': 'Image Registry', - 'app.entityPage.monitoring.title': 'Überwachung', - 'app.entityPage.lighthouse.title': 'Lighthouse', - 'app.entityPage.api.title': 'API', - 'app.entityPage.dependencies.title': 'Abhängigkeiten', - 'app.entityPage.docs.title': 'Dokumentation', - 'app.entityPage.definition.title': 'Definition', - 'app.entityPage.diagram.title': 'Systemdiagramm', - 'app.entityPage.workflows.title': 'Workflows', + 'catalog.entityPage.overview.title': 'Übersicht', + 'catalog.entityPage.topology.title': 'Topologie', + 'catalog.entityPage.issues.title': 'Issues', + 'catalog.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'catalog.entityPage.ci.title': 'CI', + 'catalog.entityPage.cd.title': 'CD', + 'catalog.entityPage.kubernetes.title': 'Kubernetes', + 'catalog.entityPage.imageRegistry.title': 'Image Registry', + 'catalog.entityPage.monitoring.title': 'Überwachung', + 'catalog.entityPage.lighthouse.title': 'Lighthouse', + 'catalog.entityPage.api.title': 'API', + 'catalog.entityPage.dependencies.title': 'Abhängigkeiten', + 'catalog.entityPage.docs.title': 'Dokumentation', + 'catalog.entityPage.definition.title': 'Definition', + 'catalog.entityPage.diagram.title': 'Systemdiagramm', + 'catalog.entityPage.workflows.title': 'Workflows', 'sidebar.menu': 'Menü', 'sidebar.home': 'Startseite', diff --git a/packages/app/src/translations/rhdh/es.ts b/packages/app/src/translations/rhdh/es.ts index 27ae6c675c..010dad8b6a 100644 --- a/packages/app/src/translations/rhdh/es.ts +++ b/packages/app/src/translations/rhdh/es.ts @@ -43,22 +43,22 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orquestador', 'menuItem.adoptionInsights': 'Insights de adopción', - 'app.entityPage.overview.title': 'Resumen', - 'app.entityPage.topology.title': 'Topología', - 'app.entityPage.issues.title': 'Problemas', - 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', - 'app.entityPage.ci.title': 'CI', - 'app.entityPage.cd.title': 'CD', - 'app.entityPage.kubernetes.title': 'Kubernetes', - 'app.entityPage.imageRegistry.title': 'Registro de Imágenes', - 'app.entityPage.monitoring.title': 'Monitoreo', - 'app.entityPage.lighthouse.title': 'Lighthouse', - 'app.entityPage.api.title': 'API', - 'app.entityPage.dependencies.title': 'Dependencias', - 'app.entityPage.docs.title': 'Documentación', - 'app.entityPage.definition.title': 'Definición', - 'app.entityPage.diagram.title': 'Diagrama del Sistema', - 'app.entityPage.workflows.title': 'Flujos de trabajo', + 'catalog.entityPage.overview.title': 'Resumen', + 'catalog.entityPage.topology.title': 'Topología', + 'catalog.entityPage.issues.title': 'Problemas', + 'catalog.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'catalog.entityPage.ci.title': 'CI', + 'catalog.entityPage.cd.title': 'CD', + 'catalog.entityPage.kubernetes.title': 'Kubernetes', + 'catalog.entityPage.imageRegistry.title': 'Registro de Imágenes', + 'catalog.entityPage.monitoring.title': 'Monitoreo', + 'catalog.entityPage.lighthouse.title': 'Lighthouse', + 'catalog.entityPage.api.title': 'API', + 'catalog.entityPage.dependencies.title': 'Dependencias', + 'catalog.entityPage.docs.title': 'Documentación', + 'catalog.entityPage.definition.title': 'Definición', + 'catalog.entityPage.diagram.title': 'Diagrama del Sistema', + 'catalog.entityPage.workflows.title': 'Flujos de trabajo', 'sidebar.menu': 'Menú', 'sidebar.home': 'Inicio', diff --git a/packages/app/src/translations/rhdh/fr.ts b/packages/app/src/translations/rhdh/fr.ts index e1d88b2390..89e602d85e 100644 --- a/packages/app/src/translations/rhdh/fr.ts +++ b/packages/app/src/translations/rhdh/fr.ts @@ -43,22 +43,22 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestrateur', 'menuItem.adoptionInsights': "Insights d'adoption", - 'app.entityPage.overview.title': 'Aperçu', - 'app.entityPage.topology.title': 'Topologie', - 'app.entityPage.issues.title': 'Problèmes', - 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', - 'app.entityPage.ci.title': 'CI', - 'app.entityPage.cd.title': 'CD', - 'app.entityPage.kubernetes.title': 'Kubernetes', - 'app.entityPage.imageRegistry.title': "Registre d'Images", - 'app.entityPage.monitoring.title': 'Surveillance', - 'app.entityPage.lighthouse.title': 'Lighthouse', - 'app.entityPage.api.title': 'API', - 'app.entityPage.dependencies.title': 'Dépendances', - 'app.entityPage.docs.title': 'Documentation', - 'app.entityPage.definition.title': 'Définition', - 'app.entityPage.diagram.title': 'Diagramme du Système', - 'app.entityPage.workflows.title': 'Flux de travail', + 'catalog.entityPage.overview.title': 'Aperçu', + 'catalog.entityPage.topology.title': 'Topologie', + 'catalog.entityPage.issues.title': 'Problèmes', + 'catalog.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'catalog.entityPage.ci.title': 'CI', + 'catalog.entityPage.cd.title': 'CD', + 'catalog.entityPage.kubernetes.title': 'Kubernetes', + 'catalog.entityPage.imageRegistry.title': "Registre d'Images", + 'catalog.entityPage.monitoring.title': 'Surveillance', + 'catalog.entityPage.lighthouse.title': 'Lighthouse', + 'catalog.entityPage.api.title': 'API', + 'catalog.entityPage.dependencies.title': 'Dépendances', + 'catalog.entityPage.docs.title': 'Documentation', + 'catalog.entityPage.definition.title': 'Définition', + 'catalog.entityPage.diagram.title': 'Diagramme du Système', + 'catalog.entityPage.workflows.title': 'Flux de travail', 'sidebar.menu': 'Menu', 'sidebar.home': 'Accueil', diff --git a/packages/app/src/translations/rhdh/it.ts b/packages/app/src/translations/rhdh/it.ts index d64d4794e7..1762b05536 100644 --- a/packages/app/src/translations/rhdh/it.ts +++ b/packages/app/src/translations/rhdh/it.ts @@ -43,22 +43,22 @@ export default createTranslationMessages({ 'menuItem.orchestrator': 'Orchestratore', 'menuItem.adoptionInsights': 'Insights di adozione', - 'app.entityPage.overview.title': 'Panoramica', - 'app.entityPage.topology.title': 'Topologia', - 'app.entityPage.issues.title': 'Problemi', - 'app.entityPage.pullRequests.title': 'Pull/Merge Requests', - 'app.entityPage.ci.title': 'CI', - 'app.entityPage.cd.title': 'CD', - 'app.entityPage.kubernetes.title': 'Kubernetes', - 'app.entityPage.imageRegistry.title': 'Registro Immagini', - 'app.entityPage.monitoring.title': 'Monitoraggio', - 'app.entityPage.lighthouse.title': 'Lighthouse', - 'app.entityPage.api.title': 'API', - 'app.entityPage.dependencies.title': 'Dipendenze', - 'app.entityPage.docs.title': 'Documentazione', - 'app.entityPage.definition.title': 'Definizione', - 'app.entityPage.diagram.title': 'Diagramma del Sistema', - 'app.entityPage.workflows.title': 'Flussi di lavoro', + 'catalog.entityPage.overview.title': 'Panoramica', + 'catalog.entityPage.topology.title': 'Topologia', + 'catalog.entityPage.issues.title': 'Problemi', + 'catalog.entityPage.pullRequests.title': 'Pull/Merge Requests', + 'catalog.entityPage.ci.title': 'CI', + 'catalog.entityPage.cd.title': 'CD', + 'catalog.entityPage.kubernetes.title': 'Kubernetes', + 'catalog.entityPage.imageRegistry.title': 'Registro Immagini', + 'catalog.entityPage.monitoring.title': 'Monitoraggio', + 'catalog.entityPage.lighthouse.title': 'Lighthouse', + 'catalog.entityPage.api.title': 'API', + 'catalog.entityPage.dependencies.title': 'Dipendenze', + 'catalog.entityPage.docs.title': 'Documentazione', + 'catalog.entityPage.definition.title': 'Definizione', + 'catalog.entityPage.diagram.title': 'Diagramma del Sistema', + 'catalog.entityPage.workflows.title': 'Flussi di lavoro', 'sidebar.menu': 'Menu', 'sidebar.home': 'Home', diff --git a/packages/app/src/translations/rhdh/ref.ts b/packages/app/src/translations/rhdh/ref.ts index aaee596c86..179a4bbc43 100644 --- a/packages/app/src/translations/rhdh/ref.ts +++ b/packages/app/src/translations/rhdh/ref.ts @@ -103,30 +103,7 @@ export const rhdhMessages = { }, }, }, - app: { - scaffolder: { - title: 'Self-service', - }, - search: { - title: 'Search', - resultType: 'Result Type', - softwareCatalog: 'Software Catalog', - filters: { - kind: 'Kind', - lifecycle: 'Lifecycle', - component: 'Component', - template: 'Template', - experimental: 'experimental', - production: 'production', - }, - }, - learningPaths: { - title: 'Learning Paths', - error: { - title: 'Could not fetch data.', - unknownError: 'Unknown error', - }, - }, + catalog: { entityPage: { overview: { title: 'Overview', @@ -177,6 +154,31 @@ export const rhdhMessages = { title: 'Workflows', }, }, + }, + app: { + scaffolder: { + title: 'Self-service', + }, + search: { + title: 'Search', + resultType: 'Result Type', + softwareCatalog: 'Software Catalog', + filters: { + kind: 'Kind', + lifecycle: 'Lifecycle', + component: 'Component', + template: 'Template', + experimental: 'experimental', + production: 'production', + }, + }, + learningPaths: { + title: 'Learning Paths', + error: { + title: 'Could not fetch data.', + unknownError: 'Unknown error', + }, + }, userSettings: { infoCard: { title: 'RHDH Metadata', From 87c4e85a1915fc36259a57e74e20ead4a8c45329 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 3 Oct 2025 20:08:49 +0530 Subject: [PATCH 5/9] fixing buld fail Signed-off-by: its-mitesh-kumar --- .../app/src/components/catalog/EntityPage/DiagramTabContent.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/components/catalog/EntityPage/DiagramTabContent.tsx b/packages/app/src/components/catalog/EntityPage/DiagramTabContent.tsx index aff0159da6..3dbeee51cf 100644 --- a/packages/app/src/components/catalog/EntityPage/DiagramTabContent.tsx +++ b/packages/app/src/components/catalog/EntityPage/DiagramTabContent.tsx @@ -27,7 +27,7 @@ export const DiagramTabContent = () => { Date: Tue, 7 Oct 2025 15:00:02 +0530 Subject: [PATCH 6/9] trying by passing titleKey in scorecard Signed-off-by: its-mitesh-kumar --- .ibm/pipelines/value_files/values_showcase-rbac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ibm/pipelines/value_files/values_showcase-rbac.yaml b/.ibm/pipelines/value_files/values_showcase-rbac.yaml index 8c8a15c58c..0c340ddbf1 100644 --- a/.ibm/pipelines/value_files/values_showcase-rbac.yaml +++ b/.ibm/pipelines/value_files/values_showcase-rbac.yaml @@ -118,6 +118,7 @@ global: entityTabs: - path: "/scorecard" title: Scorecard + titleKey: catalog.entityPage.scorecard.title mountPoint: entity.page.scorecard mountPoints: - mountPoint: entity.page.scorecard/cards From 4b3137073ea3992c00b014173194cc5d9a055285 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Wed, 15 Oct 2025 20:06:12 +0530 Subject: [PATCH 7/9] passing trnaslated tab component Signed-off-by: its-mitesh-kumar --- .../catalog/EntityPage/DynamicEntityTab.tsx | 33 +++++++++++++++ .../catalog/EntityPage/EntityPage.tsx | 42 ++++--------------- packages/app/src/utils/translations/index.ts | 1 + .../utils/translations/translationUtils.ts | 39 +++++++++++++++++ 4 files changed, 81 insertions(+), 34 deletions(-) create mode 100644 packages/app/src/utils/translations/translationUtils.ts diff --git a/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx b/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx index e522ee739f..b28c9fe2e8 100644 --- a/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx +++ b/packages/app/src/components/catalog/EntityPage/DynamicEntityTab.tsx @@ -1,14 +1,40 @@ +import { forwardRef } from 'react'; + import { Entity } from '@backstage/catalog-model'; +import { Link } from '@backstage/core-components'; import { ApiHolder } from '@backstage/core-plugin-api'; import { EntityLayout, EntitySwitch } from '@backstage/plugin-catalog'; import Box from '@mui/material/Box'; import { DynamicRootConfig } from '@red-hat-developer-hub/plugin-utils'; +import { useTranslation } from '../../../hooks/useTranslation'; import getDynamicRootConfig from '../../../utils/dynamicUI/getDynamicRootConfig'; import getMountPointData from '../../../utils/dynamicUI/getMountPointData'; +import { getTranslatedTextWithFallback } from '../../../utils/translations'; import Grid from '../Grid'; +const TranslatedTab = forwardRef< + any, + { + title?: string; + titleKey?: string; + path?: string; + children?: React.ReactNode; + [key: string]: any; + } +>((props, ref) => { + const { title, titleKey, path, children, ...otherProps } = props; + const { t } = useTranslation(); + + const translatedText = getTranslatedTextWithFallback(t, titleKey, title); + return ( + + {translatedText} + + ); +}); + export type DynamicEntityTabProps = { path: string; title: string; @@ -31,6 +57,7 @@ export type DynamicEntityTabProps = { export const dynamicEntityTab = ({ path, title, + titleKey, mountPoint, children, if: condition, @@ -39,6 +66,12 @@ export const dynamicEntityTab = ({ key={`${path}`} path={path} title={title} + tabProps={{ + component: TranslatedTab, + title: title, + titleKey: titleKey, + path: path, + }} if={entity => (condition ? errorWrappedCondition( diff --git a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx index c907a29429..915042b13c 100644 --- a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx @@ -1,36 +1,24 @@ -import { useTranslation } from '../../../hooks/useTranslation'; import { ContextMenuAwareEntityLayout } from './ContextMenuAwareEntityLayout'; import { tabChildren, tabRules } from './defaultTabs'; import { dynamicEntityTab, DynamicEntityTabProps } from './DynamicEntityTab'; import { mergeTabs } from './utils'; -const EntityPageWithTranslation = ({ - entityTabOverrides, -}: { +/** + * Displays the tabs and content for a catalog entity + * @param entityTabOverrides + * @returns + */ +export const entityPage = ( entityTabOverrides: Record< string, Omit - >; -}) => { - const { t } = useTranslation(); - - const getTranslatedTitle = (title: string, titleKey?: string) => { - if (!titleKey) { - return title; - } - const translatedTitle = t(titleKey as any, {}); - if (translatedTitle !== titleKey) { - return translatedTitle; - } - return title; - }; - + > = {}, +) => { return ( {mergeTabs(entityTabOverrides).map(([path, config]) => { return dynamicEntityTab({ ...config, - title: getTranslatedTitle(config.title, config.titleKey), path, ...(tabRules[path] ? tabRules[path] : {}), ...(tabChildren[path] ? tabChildren[path] : {}), @@ -39,17 +27,3 @@ const EntityPageWithTranslation = ({ ); }; - -/** - * Displays the tabs and content for a catalog entity - * @param entityTabOverrides - * @returns - */ -export const entityPage = ( - entityTabOverrides: Record< - string, - Omit - > = {}, -) => { - return ; -}; diff --git a/packages/app/src/utils/translations/index.ts b/packages/app/src/utils/translations/index.ts index f0f5b390a1..2d9572bed7 100644 --- a/packages/app/src/utils/translations/index.ts +++ b/packages/app/src/utils/translations/index.ts @@ -1,2 +1,3 @@ export { fetchOverrideTranslations } from './fetchOverrideTranslations'; export { translationResourceGenerator } from './translationResourceGenerator'; +export { getTranslatedTextWithFallback } from './translationUtils'; diff --git a/packages/app/src/utils/translations/translationUtils.ts b/packages/app/src/utils/translations/translationUtils.ts new file mode 100644 index 0000000000..42bad0ee6b --- /dev/null +++ b/packages/app/src/utils/translations/translationUtils.ts @@ -0,0 +1,39 @@ +/* + * Copyright Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { TranslationFunction } from '@backstage/core-plugin-api/alpha'; + +import { rhdhTranslationRef } from '../../translations/rhdh'; + +/** + * Utility function to get translated text with fallback to original text + * + * @param t - Translation function + * @param translationKey - Optional translation key to look up + * @param fallbackText - Text to display if translation key is not provided or translation is not found + * @returns Translated text or fallback text + */ +export const getTranslatedTextWithFallback = ( + t: TranslationFunction, + translationKey: string | undefined, + fallbackText: string, +): string => { + if (!translationKey) { + return fallbackText; + } + + const translation = t(translationKey as keyof typeof t, {}); + return translation !== translationKey ? translation : fallbackText; +}; From 11f50b26733e75888a6ceba48857fa6ce03886bf Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Wed, 15 Oct 2025 20:24:37 +0530 Subject: [PATCH 8/9] adding back comment Signed-off-by: its-mitesh-kumar --- packages/app/src/components/catalog/EntityPage/EntityPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx index 915042b13c..21e285591a 100644 --- a/packages/app/src/components/catalog/EntityPage/EntityPage.tsx +++ b/packages/app/src/components/catalog/EntityPage/EntityPage.tsx @@ -5,6 +5,7 @@ import { mergeTabs } from './utils'; /** * Displays the tabs and content for a catalog entity + * *Note:* do not convert convert this to a component or wrap the return value * @param entityTabOverrides * @returns */ From 92caf7e8d6fe0f4d98d19a033edffad8854a71b8 Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Fri, 17 Oct 2025 12:56:36 +0530 Subject: [PATCH 9/9] keeping previous type Signed-off-by: its-mitesh-kumar --- packages/app/src/components/catalog/EntityPage/defaultTabs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx index bb495fe08d..c3e4875bfd 100644 --- a/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx +++ b/packages/app/src/components/catalog/EntityPage/defaultTabs.tsx @@ -14,7 +14,7 @@ import { OverviewTabContent } from './OverviewTabContent'; */ export const defaultTabs: Record< string, - { title: string; titleKey?: string; mountPoint: string; priority?: number } + Omit > = { '/': { title: 'Overview',