Skip to content

Commit

Permalink
Add missing option in legend settings modal for waffles
Browse files Browse the repository at this point in the history
  • Loading branch information
mthh committed Oct 31, 2024
1 parent 1cc196d commit 79dd12a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/Modals/LegendSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1360,8 +1360,13 @@ function makeSettingsWaffle(
debouncedUpdateProps(legend.id, ['boxSpacing'], v);
}}
/>
<InputFieldText
label={LL().Legend.Modal.UnitSymbolText()}
value={legend.valueText.text}
onChange={(v) => debouncedUpdateProps(legend.id, ['valueText', 'text'], v)}
/>
<InputFieldNumber
label={'Spacing below color boxes'}
label={LL().Legend.Modal.SpacingBelowBoxes()}
value={legend.spacingBelowBoxes}
onChange={(v) => {
debouncedUpdateProps(legend.id, ['spacingBelowBoxes'], v);
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,8 @@ const en = {
DisplayMedian: 'Display median',
DisplayStdDev: 'Display standard deviation',
DisplayPopulation: 'Display population',
UnitSymbolText: 'Number of units per symbol text',
SpacingBelowBoxes: 'Spacing below color boxes',
},
},
CommonTextElement: {
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,8 @@ const fr = {
DisplayMedian: 'Afficher la médiane',
DisplayStdDev: 'Afficher l\'écart-type',
DisplayPopulation: 'Afficher la population',
UnitSymbolText: 'Texte du nombre d\'unités par symbole',
SpacingBelowBoxes: 'Espace sous les boites colorées',
},
},
CommonTextElement: {
Expand Down
16 changes: 16 additions & 0 deletions src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5866,6 +5866,14 @@ type RootTranslation = {
* D​i​s​p​l​a​y​ ​p​o​p​u​l​a​t​i​o​n
*/
DisplayPopulation: string
/**
* N​u​m​b​e​r​ ​o​f​ ​u​n​i​t​s​ ​p​e​r​ ​s​y​m​b​o​l​ ​t​e​x​t
*/
UnitSymbolText: string
/**
* S​p​a​c​i​n​g​ ​b​e​l​o​w​ ​c​o​l​o​r​ ​b​o​x​e​s
*/
SpacingBelowBoxes: string
}
}
CommonTextElement: {
Expand Down Expand Up @@ -11716,6 +11724,14 @@ export type TranslationFunctions = {
* Display population
*/
DisplayPopulation: () => LocalizedString
/**
* Number of units per symbol text
*/
UnitSymbolText: () => LocalizedString
/**
* Spacing below color boxes
*/
SpacingBelowBoxes: () => LocalizedString
}
}
CommonTextElement: {
Expand Down

0 comments on commit 79dd12a

Please sign in to comment.