fix(Discover): dropdown options translations

This commit is contained in:
Botzy 2025-05-28 13:36:21 +03:00
parent 66ad1ea59f
commit 4f9cd61286
2 changed files with 3 additions and 3 deletions

View file

@ -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, {

View file

@ -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