Closed gds-jbentham closed 1 year ago
I'd rather leave the legacy/govuk behaviour where the divider being a string is what gets rendered. instead i propose having: { divider: true }
to use a default localisation key lookup of fields.newRadioButtons.divider.label
and fields.default.divider.label
or specifying a key: { divider: true, key: 'full.localisation.key' }
to match key specifying functionality of items.
https://github.com/HMPO/hmpo-components/pull/139/files
Also the divider items should be ignored in hmpo-form-wizard when auto-adding an items validator:
merged and released (including hmpo-form-wizard update to ignore divider items)
When using the hmpo-radios component. If you add a divider to your radio button in the fields.js like the below
https://design-system.service.gov.uk/components/radios/
When you add locales the divider text does not get translated like the other items. If you add this line
if (item.divider) item.divider = translate(contentKey + '.items.' + item.divider + '.label');
Into globals.js hmpoGetItems. Then you can use the same syntax in your locales files to translate the divider text fields.yml