refactor(Discover): add translation on extra selectable

This commit is contained in:
Tim 2023-04-12 13:43:01 +02:00
parent 32a7117493
commit b41cc418c5

View file

@ -47,7 +47,7 @@ const mapSelectableInputs = (discover, t) => {
}
};
const extraSelects = discover.selectable.extra.map(({ name, isRequired, options }) => ({
title: `Select ${name}`,
title: translateOption(name, 'SELECT_'),
isRequired: isRequired,
options: options.map(({ value, deepLinks }) => ({
label: typeof value === 'string' ? translateOption(value) : t('NONE'),
@ -63,7 +63,7 @@ const mapSelectableInputs = (discover, t) => {
value
})),
renderLabelText: options.some(({ selected, value }) => selected && value === null) ?
() => `Select ${name}`
() => translateOption(name, 'SELECT_')
:
null,
onSelect: (event) => {