mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 17:15:48 +00:00
fix(Discover): dropdown options translations
This commit is contained in:
parent
66ad1ea59f
commit
4f9cd61286
2 changed files with 3 additions and 3 deletions
|
|
@ -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, {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue