From ac33330c7cc81da90a8380f55909b097698e2bae Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sat, 15 Jul 2023 18:20:59 +0300 Subject: [PATCH] Fix selection input in QueryParameterModal --- frontend/src/Search/QueryParameterModal.js | 14 +++++++------- src/NzbDrone.Core/Localization/Core/en.json | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/Search/QueryParameterModal.js b/frontend/src/Search/QueryParameterModal.js index df06648a2..863ccc003 100644 --- a/frontend/src/Search/QueryParameterModal.js +++ b/frontend/src/Search/QueryParameterModal.js @@ -14,11 +14,11 @@ import QueryParameterOption from './QueryParameterOption'; import styles from './QueryParameterModal.css'; const searchOptions = [ - { key: 'search', value: 'Basic Search' }, - { key: 'tvsearch', value: 'TV Search' }, - { key: 'movie', value: 'Movie Search' }, - { key: 'music', value: 'Audio Search' }, - { key: 'book', value: 'Book Search' } + { 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 = [ @@ -94,8 +94,8 @@ class QueryParameterModal extends Component { const newValue = `${start}${tokenValue}${end}`; onSearchInputChange({ name, value: newValue }); - this._selectionStart = newValue.length - 1; - this._selectionEnd = newValue.length - 1; + this._selectionStart = newValue.length; + this._selectionEnd = newValue.length; } }; diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 31a8f07c5..7c0c803e0 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -70,6 +70,7 @@ "BackupNow": "Backup Now", "BackupRetentionHelpText": "Automatic backups older than the retention period will be cleaned up automatically", "Backups": "Backups", + "BasicSearch": "Basic Search", "BeforeUpdate": "Before update", "BindAddress": "Bind Address", "BindAddressHelpText": "Valid IP address, localhost or '*' for all interfaces",