From 71756c8e491186d6a5c6876f2fabe2d786f6f88a Mon Sep 17 00:00:00 2001 From: Lance Gliser Date: Fri, 21 Jun 2024 12:30:43 -0500 Subject: [PATCH] Translations for the density controls --- .../locales/howso-engine-react-display-components/en.json | 4 ++++ .../FeaturesAttributesCompact/FeaturesAttributesCompact.tsx | 6 ++---- .../FeaturesAttributesCompact/constants.ts | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/public/locales/howso-engine-react-display-components/en.json b/public/locales/howso-engine-react-display-components/en.json index d92ff05..b9e74f8 100644 --- a/public/locales/howso-engine-react-display-components/en.json +++ b/public/locales/howso-engine-react-display-components/en.json @@ -201,6 +201,10 @@ "label": "Configure feature" }, "labels": { + "density": { + "compact": "Compact", + "comfortable": "Comfortable" + }, "invalidConfiguration": "Please adjust this configuration", "sample": "Sample" }, diff --git a/src/components/FeatureAttributes/FeaturesAttributesCompact/FeaturesAttributesCompact.tsx b/src/components/FeatureAttributes/FeaturesAttributesCompact/FeaturesAttributesCompact.tsx index 9b0c43a..411c374 100644 --- a/src/components/FeatureAttributes/FeaturesAttributesCompact/FeaturesAttributesCompact.tsx +++ b/src/components/FeatureAttributes/FeaturesAttributesCompact/FeaturesAttributesCompact.tsx @@ -204,16 +204,14 @@ const Header: FC = ({ color={isCompact ? "info" : "gray"} onClick={() => setIsCompact(true)} > - {/* */} - Compact + {t(translations.labels.density.compact)} diff --git a/src/components/FeatureAttributes/FeaturesAttributesCompact/constants.ts b/src/components/FeatureAttributes/FeaturesAttributesCompact/constants.ts index 4c4e448..3e528bd 100644 --- a/src/components/FeatureAttributes/FeaturesAttributesCompact/constants.ts +++ b/src/components/FeatureAttributes/FeaturesAttributesCompact/constants.ts @@ -21,6 +21,10 @@ export const translations = { label: `${base}.form.label`, }, labels: { + density: { + compact: `${base}.labels.density.compact`, + comfortable: `${base}.labels.density.comfortable`, + }, invalidConfiguration: `${base}.labels.invalidConfiguration`, sample: `${base}.labels.sample`, },