diff --git a/src/common/useTranslate.js b/src/common/useTranslate.js index fdfb2f3fe..7214a4a1e 100644 --- a/src/common/useTranslate.js +++ b/src/common/useTranslate.js @@ -9,7 +9,7 @@ const useTranslate = () => { const string = useCallback((key) => t(key), [t]); const stringWithPrefix = useCallback((value, prefix, fallback = null) => { - const key = `${prefix || ''}${value}`; + const key = `${prefix}${value}`; const defaultValue = fallback ?? value.charAt(0).toUpperCase() + value.slice(1); return t(key, { diff --git a/src/routes/Discover/useSelectableInputs.js b/src/routes/Discover/useSelectableInputs.js index 66178c7ee..97d9e7192 100644 --- a/src/routes/Discover/useSelectableInputs.js +++ b/src/routes/Discover/useSelectableInputs.js @@ -46,10 +46,10 @@ const mapSelectableInputs = (discover, t) => { } }; const extraSelects = discover.selectable.extra.map(({ name, isRequired, options }) => ({ - title: t.stringWithPrefix(name), + title: t(name), isRequired: isRequired, options: options.map(({ value, deepLinks }) => ({ - label: typeof value === 'string' ? t.stringWithPrefix(value) : t.string('NONE'), + label: typeof value === 'string' ? t(value) : t.string('NONE'), value: JSON.stringify({ href: deepLinks.discover, value