From f64d341c8038f83f7909f321600b0a9d1dd0134a Mon Sep 17 00:00:00 2001 From: keyhan Date: Thu, 11 Jun 2026 17:37:26 +0330 Subject: [PATCH] Localize shared resource-field components. Add a components.res resource-label set and move the database workload resources and optional-service resource-field components onto it. Co-Authored-By: Claude Opus 4.8 --- .../components/database-workload-resources.tsx | 16 +++++++++------- .../optional-service-resource-fields.tsx | 12 +++++++----- frontend/src/i18n/dictionaries/en.ts | 10 ++++++++++ frontend/src/i18n/dictionaries/fa.ts | 10 ++++++++++ frontend/tsconfig.tsbuildinfo | 2 +- 5 files changed, 37 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/database-workload-resources.tsx b/frontend/src/components/database-workload-resources.tsx index bdf432c..2437039 100644 --- a/frontend/src/components/database-workload-resources.tsx +++ b/frontend/src/components/database-workload-resources.tsx @@ -1,6 +1,7 @@ 'use client'; import { Database } from 'lucide-react'; +import { useT } from '@/i18n/I18nProvider'; export interface DatabaseWorkloadValues { cpuRequest: string; @@ -16,15 +17,16 @@ export function DatabaseWorkloadResources({ values: DatabaseWorkloadValues; onChange: (patch: Partial) => void; }) { + const r = useT().components.res; return (
-

Database resources

+

{r.databaseResources}

- + - - + +
- + ) => void; }) { + const r = useT().components.res; const storageStr = String(config.storageGi); const setStorage = (gb: number) => onChange({ storageGi: Math.max(0, gb) }); @@ -31,7 +33,7 @@ export function OptionalServiceResourceFields({
- +
- +