diff --git a/frontend/src/Series/Index/Select/Edit/EditSeriesModalContent.tsx b/frontend/src/Series/Index/Select/Edit/EditSeriesModalContent.tsx index 5eb8bcbf6..1f321b517 100644 --- a/frontend/src/Series/Index/Select/Edit/EditSeriesModalContent.tsx +++ b/frontend/src/Series/Index/Select/Edit/EditSeriesModalContent.tsx @@ -235,7 +235,7 @@ function EditSeriesModalContent(props: EditSeriesModalContentProps) { diff --git a/frontend/src/Settings/DownloadClients/DownloadClientSettings.js b/frontend/src/Settings/DownloadClients/DownloadClientSettings.js index de955a326..aca9111b3 100644 --- a/frontend/src/Settings/DownloadClients/DownloadClientSettings.js +++ b/frontend/src/Settings/DownloadClients/DownloadClientSettings.js @@ -6,6 +6,7 @@ import PageToolbarButton from 'Components/Page/Toolbar/PageToolbarButton'; import PageToolbarSeparator from 'Components/Page/Toolbar/PageToolbarSeparator'; import { icons } from 'Helpers/Props'; import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector'; +import translate from 'Utilities/String/translate'; import DownloadClientsConnector from './DownloadClients/DownloadClientsConnector'; import ManageDownloadClientsModal from './DownloadClients/Manage/ManageDownloadClientsModal'; import DownloadClientOptionsConnector from './Options/DownloadClientOptionsConnector'; @@ -85,7 +86,7 @@ class DownloadClientSettings extends Component { /> diff --git a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Edit/ManageDownloadClientsEditModalContent.tsx b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Edit/ManageDownloadClientsEditModalContent.tsx index 0ba86e862..458ee321e 100644 --- a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Edit/ManageDownloadClientsEditModalContent.tsx +++ b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Edit/ManageDownloadClientsEditModalContent.tsx @@ -27,9 +27,9 @@ interface ManageDownloadClientsEditModalContentProps { const NO_CHANGE = 'noChange'; const enableOptions = [ - { key: NO_CHANGE, value: 'No Change', disabled: true }, - { key: 'enabled', value: 'Enabled' }, - { key: 'disabled', value: 'Disabled' }, + { key: NO_CHANGE, value: translate('NoChange'), disabled: true }, + { key: 'enabled', value: translate('Enabled') }, + { key: 'disabled', value: translate('Disabled') }, ]; function ManageDownloadClientsEditModalContent( @@ -97,7 +97,9 @@ function ManageDownloadClientsEditModalContent( setRemoveFailedDownloads(value); break; default: - console.warn('EditDownloadClientsModalContent Unknown Input'); + console.warn( + `EditDownloadClientsModalContent Unknown Input: '${name}'` + ); } }, [] @@ -162,7 +164,7 @@ function ManageDownloadClientsEditModalContent(
- {translate('{count} download clients selected', { + {translate('CountDownloadClientsSelected', { count: selectedCount, })}
@@ -170,7 +172,7 @@ function ManageDownloadClientsEditModalContent(
- +
diff --git a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalContent.tsx b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalContent.tsx index 1232803cc..5d9f434c0 100644 --- a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalContent.tsx +++ b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalContent.tsx @@ -1,6 +1,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { DownloadClientAppState } from 'App/State/SettingsAppState'; +import Alert from 'Components/Alert'; import Button from 'Components/Link/Button'; import SpinnerButton from 'Components/Link/SpinnerButton'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; @@ -20,6 +21,7 @@ import { import createClientSideCollectionSelector from 'Store/Selectors/createClientSideCollectionSelector'; import { SelectStateInputProps } from 'typings/props'; import getErrorMessage from 'Utilities/Object/getErrorMessage'; +import translate from 'Utilities/String/translate'; import getSelectedIds from 'Utilities/Table/getSelectedIds'; import ManageDownloadClientsEditModal from './Edit/ManageDownloadClientsEditModal'; import ManageDownloadClientsModalRow from './ManageDownloadClientsModalRow'; @@ -34,37 +36,37 @@ type OnSelectedChangeCallback = React.ComponentProps< const COLUMNS = [ { name: 'name', - label: 'Name', + label: translate('Name'), isSortable: true, isVisible: true, }, { name: 'implementation', - label: 'Implementation', + label: translate('Implementation'), isSortable: true, isVisible: true, }, { name: 'enable', - label: 'Enabled', + label: translate('Enabled'), isSortable: true, isVisible: true, }, { name: 'priority', - label: 'Priority', + label: translate('Priority'), isSortable: true, isVisible: true, }, { name: 'removeCompletedDownloads', - label: 'Remove Completed', + label: translate('RemoveCompleted'), isSortable: true, isVisible: true, }, { name: 'removeFailedDownloads', - label: 'Remove Failed', + label: translate('RemoveFailed'), isSortable: true, isVisible: true, }, @@ -191,17 +193,24 @@ function ManageDownloadClientsModalContent( [items, setSelectState] ); - const errorMessage = getErrorMessage(error, 'Unable to load import lists.'); + const errorMessage = getErrorMessage( + error, + 'Unable to load download clients.' + ); const anySelected = selectedCount > 0; return ( - Manage Import Lists + {translate('ManageDownloadClients')} {isFetching ? : null} {error ?
{errorMessage}
: null} + {isPopulated && !error && !items.length && ( + {translate('NoDownloadClientsFound')} + )} + {isPopulated && !!items.length && !isFetching && !isFetching ? ( - Delete + {translate('Delete')} - Edit + {translate('Edit')} - + diff --git a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalRow.tsx b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalRow.tsx index e41b7ba24..5e1a62cb5 100644 --- a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalRow.tsx +++ b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/ManageDownloadClientsModalRow.tsx @@ -1,10 +1,13 @@ import React, { useCallback } from 'react'; +import Label from 'Components/Label'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import Column from 'Components/Table/Column'; import TableRow from 'Components/Table/TableRow'; import TagListConnector from 'Components/TagListConnector'; +import { kinds } from 'Helpers/Props'; import { SelectStateInputProps } from 'typings/props'; +import translate from 'Utilities/String/translate'; import styles from './ManageDownloadClientsModalRow.css'; interface ManageDownloadClientsModalRowProps { @@ -61,17 +64,19 @@ function ManageDownloadClientsModalRow( - {enable ? 'Yes' : 'No'} + {priority} - {removeCompletedDownloads ? 'Yes' : 'No'} + {removeCompletedDownloads ? translate('Yes') : translate('No')} - {removeFailedDownloads ? 'Yes' : 'No'} + {removeFailedDownloads ? translate('Yes') : translate('No')} diff --git a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Tags/TagsModalContent.tsx b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Tags/TagsModalContent.tsx index e8885596f..23b52d50f 100644 --- a/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Tags/TagsModalContent.tsx +++ b/frontend/src/Settings/DownloadClients/DownloadClients/Manage/Tags/TagsModalContent.tsx @@ -17,6 +17,7 @@ import ModalHeader from 'Components/Modal/ModalHeader'; import { inputTypes, kinds, sizes } from 'Helpers/Props'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; import DownloadClient from 'typings/DownloadClient'; +import translate from 'Utilities/String/translate'; import styles from './TagsModalContent.css'; interface TagsModalContentProps { @@ -36,7 +37,7 @@ function TagsModalContent(props: TagsModalContentProps) { const [tags, setTags] = useState([]); const [applyTags, setApplyTags] = useState('add'); - const seriesTags = useMemo(() => { + const downloadClientsTags = useMemo(() => { const tags = ids.reduce((acc: number[], id) => { const s = allDownloadClients.items.find( (s: DownloadClient) => s.id === id @@ -71,19 +72,19 @@ function TagsModalContent(props: TagsModalContentProps) { }, [tags, applyTags, onApplyTagsPress]); const applyTagsOptions = [ - { key: 'add', value: 'Add' }, - { key: 'remove', value: 'Remove' }, - { key: 'replace', value: 'Replace' }, + { key: 'add', value: translate('Add') }, + { key: 'remove', value: translate('Remove') }, + { key: 'replace', value: translate('Replace') }, ]; return ( - Tags + {translate('Tags')}
- Tags + {translate('Tags')} - Apply Tags + {translate('ApplyTags')} - Result + {translate('Result')}
- {seriesTags.map((id) => { + {downloadClientsTags.map((id) => { const tag = tagList.find((t) => t.id === id); if (!tag) { @@ -129,7 +130,11 @@ function TagsModalContent(props: TagsModalContentProps) { return (
- Delete + {translate('Delete')} - Edit + {translate('Edit')} - Set Tags + {translate('SetTags')} - + diff --git a/frontend/src/Settings/ImportLists/ImportLists/Manage/Tags/TagsModalContent.tsx b/frontend/src/Settings/ImportLists/ImportLists/Manage/Tags/TagsModalContent.tsx index ad9ae4652..a39d0ca86 100644 --- a/frontend/src/Settings/ImportLists/ImportLists/Manage/Tags/TagsModalContent.tsx +++ b/frontend/src/Settings/ImportLists/ImportLists/Manage/Tags/TagsModalContent.tsx @@ -17,6 +17,7 @@ import ModalHeader from 'Components/Modal/ModalHeader'; import { inputTypes, kinds, sizes } from 'Helpers/Props'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; import ImportList from 'typings/ImportList'; +import translate from 'Utilities/String/translate'; import styles from './TagsModalContent.css'; interface TagsModalContentProps { @@ -36,7 +37,7 @@ function TagsModalContent(props: TagsModalContentProps) { const [tags, setTags] = useState([]); const [applyTags, setApplyTags] = useState('add'); - const seriesTags = useMemo(() => { + const importListsTags = useMemo(() => { const tags = ids.reduce((acc: number[], id) => { const s = allImportLists.items.find((s: ImportList) => s.id === id); @@ -69,19 +70,19 @@ function TagsModalContent(props: TagsModalContentProps) { }, [tags, applyTags, onApplyTagsPress]); const applyTagsOptions = [ - { key: 'add', value: 'Add' }, - { key: 'remove', value: 'Remove' }, - { key: 'replace', value: 'Replace' }, + { key: 'add', value: translate('Add') }, + { key: 'remove', value: translate('Remove') }, + { key: 'replace', value: translate('Replace') }, ]; return ( - Tags + {translate('Tags')} - Tags + {translate('Tags')} - Apply Tags + {translate('ApplyTags')} - Result + {translate('Result')}
- {seriesTags.map((id) => { + {importListsTags.map((id) => { const tag = tagList.find((t) => t.id === id); if (!tag) { @@ -127,7 +128,11 @@ function TagsModalContent(props: TagsModalContentProps) { return (
- Delete + {translate('Delete')} - Edit + {translate('Edit')} - Set Tags + {translate('SetTags')} - + diff --git a/frontend/src/Settings/Indexers/Indexers/Manage/ManageIndexersModalRow.tsx b/frontend/src/Settings/Indexers/Indexers/Manage/ManageIndexersModalRow.tsx index 10ea7ffaa..c888b84c4 100644 --- a/frontend/src/Settings/Indexers/Indexers/Manage/ManageIndexersModalRow.tsx +++ b/frontend/src/Settings/Indexers/Indexers/Manage/ManageIndexersModalRow.tsx @@ -1,10 +1,13 @@ import React, { useCallback } from 'react'; +import Label from 'Components/Label'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableSelectCell from 'Components/Table/Cells/TableSelectCell'; import Column from 'Components/Table/Column'; import TableRow from 'Components/Table/TableRow'; import TagListConnector from 'Components/TagListConnector'; +import { kinds } from 'Helpers/Props'; import { SelectStateInputProps } from 'typings/props'; +import translate from 'Utilities/String/translate'; import styles from './ManageIndexersModalRow.css'; interface ManageIndexersModalRowProps { @@ -59,15 +62,30 @@ function ManageIndexersModalRow(props: ManageIndexersModalRowProps) { - {enableRss ? 'Yes' : 'No'} + - {enableAutomaticSearch ? 'Yes' : 'No'} + - {enableInteractiveSearch ? 'Yes' : 'No'} + {priority} diff --git a/frontend/src/Settings/Indexers/Indexers/Manage/Tags/TagsModalContent.tsx b/frontend/src/Settings/Indexers/Indexers/Manage/Tags/TagsModalContent.tsx index 1f681707c..3205c071a 100644 --- a/frontend/src/Settings/Indexers/Indexers/Manage/Tags/TagsModalContent.tsx +++ b/frontend/src/Settings/Indexers/Indexers/Manage/Tags/TagsModalContent.tsx @@ -17,6 +17,7 @@ import ModalHeader from 'Components/Modal/ModalHeader'; import { inputTypes, kinds, sizes } from 'Helpers/Props'; import createTagsSelector from 'Store/Selectors/createTagsSelector'; import Indexer from 'typings/Indexer'; +import translate from 'Utilities/String/translate'; import styles from './TagsModalContent.css'; interface TagsModalContentProps { @@ -36,7 +37,7 @@ function TagsModalContent(props: TagsModalContentProps) { const [tags, setTags] = useState([]); const [applyTags, setApplyTags] = useState('add'); - const seriesTags = useMemo(() => { + const indexersTags = useMemo(() => { const tags = ids.reduce((acc: number[], id) => { const s = allIndexers.items.find((s: Indexer) => s.id === id); @@ -69,19 +70,19 @@ function TagsModalContent(props: TagsModalContentProps) { }, [tags, applyTags, onApplyTagsPress]); const applyTagsOptions = [ - { key: 'add', value: 'Add' }, - { key: 'remove', value: 'Remove' }, - { key: 'replace', value: 'Replace' }, + { key: 'add', value: translate('Add') }, + { key: 'remove', value: translate('Remove') }, + { key: 'replace', value: translate('Replace') }, ]; return ( - Tags + {translate('Tags')} - Tags + {translate('Tags')} - Apply Tags + {translate('ApplyTags')} - Result + {translate('Result')}
- {seriesTags.map((id) => { + {indexersTags.map((id) => { const tag = tagList.find((t) => t.id === id); if (!tag) { @@ -127,7 +128,11 @@ function TagsModalContent(props: TagsModalContentProps) { return (