Fix translations for option values

pull/1810/head
Bogdan 1 year ago
parent 3c5eefc349
commit 1100f350ae

@ -33,7 +33,7 @@ function HintedSelectInputOption(props) {
isMobile && styles.isMobile
)}
>
<div>{value}</div>
<div>{typeof value === 'function' ? value() : value}</div>
{
hint != null &&
@ -48,7 +48,7 @@ function HintedSelectInputOption(props) {
HintedSelectInputOption.propTypes = {
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
value: PropTypes.string.isRequired,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,
hint: PropTypes.node,
depth: PropTypes.number,
isSelected: PropTypes.bool.isRequired,

@ -14,11 +14,11 @@ import QueryParameterOption from './QueryParameterOption';
import styles from './QueryParameterModal.css';
const searchOptions = [
{ key: 'search', value: translate('BasicSearch') },
{ key: 'tvsearch', value: translate('TvSearch') },
{ key: 'movie', value: translate('MovieSearch') },
{ key: 'music', value: translate( 'AudioSearch') },
{ key: 'book', value: translate('BookSearch') }
{ key: 'search', value: () => translate('BasicSearch') },
{ key: 'tvsearch', value: () => translate('TvSearch') },
{ key: 'movie', value: () => translate('MovieSearch') },
{ key: 'music', value: () => translate( 'AudioSearch') },
{ key: 'book', value: () => translate('BookSearch') }
];
const seriesTokens = [

@ -19,9 +19,24 @@ import translate from 'Utilities/String/translate';
import styles from './EditApplicationModalContent.css';
const syncLevelOptions = [
{ key: 'disabled', value: translate('Disabled') },
{ key: 'addOnly', value: translate('AddRemoveOnly') },
{ key: 'fullSync', value: translate('FullSync') }
{
key: 'disabled',
get value() {
return translate('Disabled');
}
},
{
key: 'addOnly',
get value() {
return translate('AddRemoveOnly');
}
},
{
key: 'fullSync',
get value() {
return translate('FullSync');
}
}
];
function EditApplicationModalContent(props) {

Loading…
Cancel
Save