Skip to content

Commit

Permalink
Merge pull request #168 from open-formulieren/issue/4505-selectboxes-…
Browse files Browse the repository at this point in the history
…validation-placeholders

💬 [open-formulieren/open-forms#4505] Change selectboxes validation placeholders
  • Loading branch information
sergei-maertens authored Jul 9, 2024
2 parents 9d4ce28 + f0c23f8 commit 5f23f96
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
10 changes: 10 additions & 0 deletions i18n/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,11 @@
"description": "Tooltip for 'deriveCity' builder field",
"originalDefault": "If the postcode and house number are entered this field will autofill with the city"
},
"VNGD7o": {
"defaultMessage": "Maximum selected checkboxes (e.g. 1)",
"description": "Placeholder for 'validate.maxSelectedCount' builder field",
"originalDefault": "Maximum selected checkboxes (e.g. 1)"
},
"VX9nvG": {
"defaultMessage": "Maximum date {configured, select, false {(not set)} other {}}",
"description": "Date field 'maxDate' validation panel title",
Expand Down Expand Up @@ -1209,6 +1214,11 @@
"description": "Tooltip for 'addAnother' builder field",
"originalDefault": "Set the text of the 'Add Another' button."
},
"oGBVo2": {
"defaultMessage": "Minimum selected checkboxes (e.g. 1)",
"description": "Placeholder for 'validate.minSelectedCount' builder field",
"originalDefault": "Minimum selected checkboxes (e.g. 1)"
},
"oWJX5K": {
"defaultMessage": "Suffix (e.g. m²)",
"description": "Component translations 'suffix' property label",
Expand Down
10 changes: 10 additions & 0 deletions i18n/messages/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,11 @@
"description": "Tooltip for 'deriveCity' builder field",
"originalDefault": "If the postcode and house number are entered this field will autofill with the city"
},
"VNGD7o": {
"defaultMessage": "Maximaal aantal aangevinkte opties (bijv. 1)",
"description": "Placeholder for 'validate.maxSelectedCount' builder field",
"originalDefault": "Maximum selected checkboxes (e.g. 1)"
},
"VX9nvG": {
"defaultMessage": "Maximale datum {configured, select, false {(niet ingesteld)} other {}}",
"description": "Date field 'maxDate' validation panel title",
Expand Down Expand Up @@ -1227,6 +1232,11 @@
"description": "Tooltip for 'addAnother' builder field",
"originalDefault": "Set the text of the 'Add Another' button."
},
"oGBVo2": {
"defaultMessage": "Minimaal aantal aangevinkte opties (bijv. 1)",
"description": "Placeholder for 'validate.minSelectedCount' builder field",
"originalDefault": "Minimum selected checkboxes (e.g. 1)"
},
"oWJX5K": {
"defaultMessage": "Suffix (bijv. m²)",
"description": "Component translations 'suffix' property label",
Expand Down
10 changes: 8 additions & 2 deletions src/registry/selectboxes/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ const MinSelectedCheckboxes: React.FC = () => {
defaultMessage="Minimum selected checkboxes"
/>
}
placeholder="1"
placeholder={intl.formatMessage({
description: "Placeholder for 'validate.minSelectedCount' builder field",
defaultMessage: 'Minimum selected checkboxes (e.g. 1)',
})}
tooltip={tooltip}
min={1}
step={1}
Expand All @@ -262,7 +265,10 @@ const MaxSelectedCheckboxes: React.FC = () => {
defaultMessage="Maximum selected checkboxes"
/>
}
placeholder="1"
placeholder={intl.formatMessage({
description: "Placeholder for 'validate.maxSelectedCount' builder field",
defaultMessage: 'Maximum selected checkboxes (e.g. 1)',
})}
tooltip={tooltip}
min={1}
step={1}
Expand Down

0 comments on commit 5f23f96

Please sign in to comment.