From 8b2a0adca2fcfe79917a1f977aff599f3d8d83dc Mon Sep 17 00:00:00 2001 From: Asier Isayas Date: Tue, 31 Mar 2026 08:08:37 -0700 Subject: [PATCH] add text localization --- .../ThroughputBucketsComponent.tsx | 24 ++++++++++++------- src/Localization/en/Resources.json | 9 ++++++- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/ThroughputBucketsComponent.tsx b/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/ThroughputBucketsComponent.tsx index 9baee3586..be7e14b00 100644 --- a/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/ThroughputBucketsComponent.tsx +++ b/src/Explorer/Controls/Settings/SettingsSubComponents/ThroughputInputComponents/ThroughputBucketsComponent.tsx @@ -67,16 +67,19 @@ export const ThroughputBucketsComponent: FC = ( const getThroughputBucketOptions = (): IDropdownOption[] => { const noDefaultThroughputBucketSelected: IDropdownOption = { key: NoDefaultThroughputSelectedKey, - text: "No Default Throughput Bucket Selected", + text: t(Keys.controls.settings.throughputBuckets.noDefaultBucketSelected), }; const throughputBucketOptions: IDropdownOption[] = throughputBuckets.map((bucket) => ({ key: bucket.id, - text: `Bucket ${bucket.id} - ${bucket.maxThroughputPercentage}%`, + text: t(Keys.controls.settings.throughputBuckets.bucketOptionLabel, { + id: String(bucket.id), + percentage: String(bucket.maxThroughputPercentage), + }), disabled: bucket.maxThroughputPercentage === 100, ...(bucket.maxThroughputPercentage === 100 && { data: { - tooltip: `Bucket ${bucket.id} is not active.`, + tooltip: t(Keys.controls.settings.throughputBuckets.bucketNotActive, { id: String(bucket.id) }), }, }), })); @@ -127,16 +130,19 @@ export const ThroughputBucketsComponent: FC = ( const onRenderDefaultThroughputBucketLabel = (): JSX.Element => { const tooltipContent = (): JSX.Element => ( - The default throughput bucket is used for operations that do not specify a particular bucket.{" "} - - Learn more. + {t(Keys.controls.settings.throughputBuckets.defaultBucketTooltip)}{" "} + + {t(Keys.controls.settings.throughputBuckets.defaultBucketTooltipLearnMore)} ); return ( - + @@ -210,8 +216,8 @@ export const ThroughputBucketsComponent: FC = ( ))} throughputbucket.isDefaultBucket)?.id || diff --git a/src/Localization/en/Resources.json b/src/Localization/en/Resources.json index 55a823113..ea8833fd9 100644 --- a/src/Localization/en/Resources.json +++ b/src/Localization/en/Resources.json @@ -961,7 +961,14 @@ "bucketLabel": "Bucket {{id}}", "dataExplorerQueryBucket": " (Data Explorer Query Bucket)", "active": "Active", - "inactive": "Inactive" + "inactive": "Inactive", + "defaultBucketLabel": "Default Throughput Bucket", + "defaultBucketPlaceholder": "Select a default throughput bucket", + "defaultBucketTooltip": "The default throughput bucket is used for operations that do not specify a particular bucket.", + "defaultBucketTooltipLearnMore": "Learn more.", + "noDefaultBucketSelected": "No Default Throughput Bucket Selected", + "bucketOptionLabel": "Bucket {{id}} - {{percentage}}%", + "bucketNotActive": "Bucket {{id}} is not active." } } }