Skip to content

Commit

Permalink
Translations for the density controls
Browse files Browse the repository at this point in the history
  • Loading branch information
lancegliser committed Jun 21, 2024
1 parent 5ec478e commit 71756c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions public/locales/howso-engine-react-display-components/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@
"label": "Configure feature"
},
"labels": {
"density": {
"compact": "Compact",
"comfortable": "Comfortable"
},
"invalidConfiguration": "Please adjust this configuration",
"sample": "Sample"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,14 @@ const Header: FC<HeaderProps> = ({
color={isCompact ? "info" : "gray"}
onClick={() => setIsCompact(true)}
>
{/* <HiUserCircle className="mr-3 h-4 w-4" /> */}
Compact
{t(translations.labels.density.compact)}
</Button>
<Button
size={"sm"}
color={!isCompact ? "info" : "gray"}
onClick={() => setIsCompact(false)}
>
{/* <HiAdjustments className="mr-3 h-4 w-4" /> */}
Comfortable
{t(translations.labels.density.comfortable)}
</Button>
</Button.Group>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
},
Expand Down

0 comments on commit 71756c8

Please sign in to comment.