From bb42830a77d2380b2d6dc4ebacd948726d1fe15d Mon Sep 17 00:00:00 2001 From: its-mitesh-kumar Date: Tue, 18 Nov 2025 20:17:39 +0530 Subject: [PATCH] address remaining comments Signed-off-by: its-mitesh-kumar --- .../src/components/Cluster/Cluster.tsx | 6 ++---- .../ConfigmapsAccordions/ConfigmapsDrawer.tsx | 5 ++++- .../components/CronJobsAccordions/CronJobsDrawer.tsx | 5 ++++- .../CustomResources/ArgoRollouts/Rollout.tsx | 10 ++++++---- .../CustomResources/ArgoRollouts/RolloutDrawer.tsx | 5 ++++- .../DaemonSetsAccordions/DaemonSetsDrawer.tsx | 5 ++++- .../DeploymentsAccordions/DeploymentDrawer.tsx | 5 ++++- plugins/kubernetes-react/src/translation.ts | 7 +++++-- 8 files changed, 33 insertions(+), 15 deletions(-) diff --git a/plugins/kubernetes-react/src/components/Cluster/Cluster.tsx b/plugins/kubernetes-react/src/components/Cluster/Cluster.tsx index 319dcb1482..65fc44e170 100644 --- a/plugins/kubernetes-react/src/components/Cluster/Cluster.tsx +++ b/plugins/kubernetes-react/src/components/Cluster/Cluster.tsx @@ -92,14 +92,12 @@ const ClusterSummary = ({ spacing={0} > - - {totalNumberOfPods} {t('cluster.pods')} - + {t('cluster.pods', { count: totalNumberOfPods })} {numberOfPodsWithErrors > 0 ? ( - {numberOfPodsWithErrors} {t('cluster.podsWithErrors')} + {t('cluster.podsWithErrors', { count: numberOfPodsWithErrors })} ) : ( {t('cluster.noPodsWithErrors')} diff --git a/plugins/kubernetes-react/src/components/ConfigmapsAccordions/ConfigmapsDrawer.tsx b/plugins/kubernetes-react/src/components/ConfigmapsAccordions/ConfigmapsDrawer.tsx index 8bd1fea793..729355de5f 100644 --- a/plugins/kubernetes-react/src/components/ConfigmapsAccordions/ConfigmapsDrawer.tsx +++ b/plugins/kubernetes-react/src/components/ConfigmapsAccordions/ConfigmapsDrawer.tsx @@ -58,7 +58,10 @@ export const ConfigmapsDrawer = ({ {namespace && ( - + )} diff --git a/plugins/kubernetes-react/src/components/CronJobsAccordions/CronJobsDrawer.tsx b/plugins/kubernetes-react/src/components/CronJobsAccordions/CronJobsDrawer.tsx index 0f689d14ad..8d21f73ce3 100644 --- a/plugins/kubernetes-react/src/components/CronJobsAccordions/CronJobsDrawer.tsx +++ b/plugins/kubernetes-react/src/components/CronJobsAccordions/CronJobsDrawer.tsx @@ -62,7 +62,10 @@ export const CronJobDrawer = ({ {namespace && ( - + )} diff --git a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx index 6ec062c080..60f5c646f1 100644 --- a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx +++ b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx @@ -128,18 +128,20 @@ const RolloutSummary = ({ > - {t('hpa.minReplicas')} {hpa.spec?.minReplicas ?? '?'} /{' '} - {t('hpa.maxReplicas')} {hpa.spec?.maxReplicas ?? '?'} + {t('hpa.replicasSummary', { + min: hpa.spec?.minReplicas ?? '?', + max: hpa.spec?.maxReplicas ?? '?', + })} - {t('hpa.currentCpuUsage')} {cpuUtil ?? '?'}% + {t('hpa.currentCpuUsageLabel', { value: cpuUtil ?? '?' })} - {t('hpa.targetCpuUsage')} {specCpuUtil ?? '?'}% + {t('hpa.targetCpuUsageLabel', { value: specCpuUtil ?? '?' })} diff --git a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx index ef4a771284..d02d9bd9fe 100644 --- a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx +++ b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/RolloutDrawer.tsx @@ -56,7 +56,10 @@ export const RolloutDrawer = ({ {namespace && ( - + )} diff --git a/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsDrawer.tsx b/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsDrawer.tsx index dcbe2d48d3..00f41cdf69 100644 --- a/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsDrawer.tsx +++ b/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsDrawer.tsx @@ -71,7 +71,10 @@ export const DaemonSetDrawer = ({ {namespace && ( - + )} diff --git a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentDrawer.tsx b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentDrawer.tsx index 3e63424b0a..31bee930d3 100644 --- a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentDrawer.tsx +++ b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentDrawer.tsx @@ -74,7 +74,10 @@ export const DeploymentDrawer = ({ {namespace && ( - + )} diff --git a/plugins/kubernetes-react/src/translation.ts b/plugins/kubernetes-react/src/translation.ts index 3e41b53a53..0420cc04bf 100644 --- a/plugins/kubernetes-react/src/translation.ts +++ b/plugins/kubernetes-react/src/translation.ts @@ -23,10 +23,12 @@ export const kubernetesReactTranslationRef = createTranslationRef({ cluster: { label: 'Cluster', pods: 'pods', + pods_one: '{{count}} pod', + pods_other: '{{count}} pods', podsWithErrors: 'pods with errors', + podsWithErrors_one: '{{count}} pod with errors', + podsWithErrors_other: '{{count}} pods with errors', noPodsWithErrors: 'No pods with errors', - podWithErrors_one: '{{count}} pod with errors', - podWithErrors_other: '{{count}} pods with errors', }, podsTable: { columns: { @@ -138,6 +140,7 @@ export const kubernetesReactTranslationRef = createTranslationRef({ }, namespace: { label: 'namespace:', + labelWithValue: 'namespace: {{namespace}}', }, kubernetesDialog: { closeAriaLabel: 'close',