1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-05 15:47:20 +02:00

Add translations to Auto Tagging

This commit is contained in:
Bogdan 2023-07-26 07:46:02 +03:00
parent 80099dcacb
commit 430ea81937
7 changed files with 48 additions and 29 deletions

View File

@ -6,6 +6,7 @@ import IconButton from 'Components/Link/IconButton';
import ConfirmModal from 'Components/Modal/ConfirmModal';
import TagList from 'Components/TagList';
import { icons, kinds } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
import EditAutoTaggingModal from './EditAutoTaggingModal';
import styles from './AutoTagging.css';
@ -63,7 +64,7 @@ export default function AutoTagging(props) {
<div>
<IconButton
className={styles.cloneButton}
title="Clone Auto Tag"
title={translate('CloneAutoTag')}
name={icons.CLONE}
onPress={onClonePress}
/>
@ -112,9 +113,9 @@ export default function AutoTagging(props) {
<ConfirmModal
isOpen={isDeleteModalOpen}
kind={kinds.DANGER}
title="Delete Auto Tag"
message={`Are you sure you want to delete the auto tag '${name}'?`}
confirmLabel="Delete"
title={translate('DeleteAutoTag')}
message={translate('DeleteAutoTagHelpText', [name])}
confirmLabel={translate('Delete')}
isSpinning={isDeleting}
onConfirm={onConfirmDelete}
onCancel={onDeleteModalClose}

View File

@ -10,6 +10,7 @@ import { cloneAutoTagging, deleteAutoTagging, fetchAutoTaggings } from 'Store/Ac
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
import createTagsSelector from 'Store/Selectors/createTagsSelector';
import sortByName from 'Utilities/Array/sortByName';
import translate from 'Utilities/String/translate';
import AutoTagging from './AutoTagging';
import EditAutoTaggingModal from './EditAutoTaggingModal';
import styles from './AutoTaggings.css';
@ -55,9 +56,9 @@ export default function AutoTaggings() {
}, [dispatch]);
return (
<FieldSet legend="Auto Tagging">
<FieldSet legend={translate('AutoTagging')}>
<PageSectionContent
errorMessage="Unable to load auto taggimg"
errorMessage={translate('UnableToLoadAutoTagging')}
error={error}
isFetching={isFetching}
isPopulated={isPopulated}

View File

@ -24,6 +24,7 @@ import {
setAutoTaggingValue
} from 'Store/Actions/settingsActions';
import { createProviderSettingsSelectorHook } from 'Store/Selectors/createProviderSettingsSelector';
import translate from 'Utilities/String/translate';
import AddSpecificationModal from './Specifications/AddSpecificationModal';
import EditSpecificationModal from './Specifications/EditSpecificationModal';
import Specification from './Specifications/Specification';
@ -110,7 +111,7 @@ export default function EditAutoTaggingModalContent(props) {
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
{id ? 'Edit Auto Tag' : 'Add Auto Tag'}
{id ? translate('EditAutoTag') : translate('AddAutoTag')}
</ModalHeader>
<ModalBody>
@ -136,7 +137,7 @@ export default function EditAutoTaggingModalContent(props) {
>
<FormGroup>
<FormLabel>
Name
{translate('Name')}
</FormLabel>
<FormInputGroup
@ -148,19 +149,19 @@ export default function EditAutoTaggingModalContent(props) {
</FormGroup>
<FormGroup>
<FormLabel>{'Remove Tags Automatically'}</FormLabel>
<FormLabel>{translate('RemoveTagsAutomatically')}</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="removeTagsAutomatically"
helpText={'Remove tags automatically if conditions are not met'}
helpText={translate('RemoveTagsAutomaticallyHelpText')}
{...removeTagsAutomatically}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>Tags</FormLabel>
<FormLabel>{translate('Tags')}</FormLabel>
<FormInputGroup
type={inputTypes.TAG}
@ -171,7 +172,7 @@ export default function EditAutoTaggingModalContent(props) {
</FormGroup>
</Form>
<FieldSet legend={'Conditions'}>
<FieldSet legend={translate('Conditions')}>
<div className={styles.autoTaggings}>
{
specifications.map((tag) => {
@ -229,7 +230,7 @@ export default function EditAutoTaggingModalContent(props) {
kind={kinds.DANGER}
onPress={onDeleteAutoTaggingPress}
>
Delete
{translate('Delete')}
</Button> :
null
}
@ -245,7 +246,7 @@ export default function EditAutoTaggingModalContent(props) {
<Button
onPress={onModalClose}
>
Cancel
{translate('Cancel')}
</Button>
<SpinnerErrorButton
@ -253,7 +254,7 @@ export default function EditAutoTaggingModalContent(props) {
error={saveError}
onPress={onSavePress}
>
Save
{translate('Save')}
</SpinnerErrorButton>
</ModalFooter>
</ModalContent>

View File

@ -5,6 +5,7 @@ import Link from 'Components/Link/Link';
import Menu from 'Components/Menu/Menu';
import MenuContent from 'Components/Menu/MenuContent';
import { sizes } from 'Helpers/Props';
import translate from 'Utilities/String/translate';
import AddSpecificationPresetMenuItem from './AddSpecificationPresetMenuItem';
import styles from './AddSpecificationItem.css';
@ -45,7 +46,7 @@ export default function AddSpecificationItem(props) {
size={sizes.SMALL}
onPress={onWrappedSpecificationSelect}
>
Custom
{translate('Custom')}
</Button>
<Menu className={styles.presetsMenu}>
@ -53,7 +54,7 @@ export default function AddSpecificationItem(props) {
className={styles.presetsMenuButton}
size={sizes.SMALL}
>
Presets
{translate('Presets')}
</Button>
<MenuContent>
@ -81,7 +82,7 @@ export default function AddSpecificationItem(props) {
to={infoLink}
size={sizes.SMALL}
>
More Info
{translate('MoreInfo')}
</Button> :
null
}

View File

@ -13,6 +13,7 @@ import {
fetchAutoTaggingSpecificationSchema,
selectAutoTaggingSpecificationSchema
} from 'Store/Actions/settingsActions';
import translate from 'Utilities/String/translate';
import AddSpecificationItem from './AddSpecificationItem';
import styles from './AddSpecificationModalContent.css';
@ -44,7 +45,7 @@ export default function AddSpecificationModalContent(props) {
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
Add Condition
{translate('AddCondition')}
</ModalHeader>
<ModalBody>
@ -93,7 +94,7 @@ export default function AddSpecificationModalContent(props) {
<Button
onPress={onModalClose}
>
Close
{translate('Close')}
</Button>
</ModalFooter>
</ModalContent>

View File

@ -22,6 +22,7 @@ import {
setAutoTaggingSpecificationValue
} from 'Store/Actions/settingsActions';
import { createProviderSettingsSelectorHook } from 'Store/Selectors/createProviderSettingsSelector';
import translate from 'Utilities/String/translate';
import styles from './EditSpecificationModalContent.css';
function EditSpecificationModalContent(props) {
@ -71,7 +72,7 @@ function EditSpecificationModalContent(props) {
return (
<ModalContent onModalClose={onCancelPress}>
<ModalHeader>
{`${id ? 'Edit' : 'Add'} Condition - ${implementationName}`}
{`${id ? translate('EditCondition') : translate('AddCondition')} - ${implementationName}`}
</ModalHeader>
<ModalBody>
@ -94,7 +95,7 @@ function EditSpecificationModalContent(props) {
<FormGroup>
<FormLabel>
Name
{translate('Name')}
</FormLabel>
<FormInputGroup
@ -122,28 +123,28 @@ function EditSpecificationModalContent(props) {
<FormGroup>
<FormLabel>
Negate
{translate('Negate')}
</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="negate"
{...negate}
helpText={`If checked, the auto tagging rule will not apply if this ${implementationName} condition matches.`}
helpText={translate('AutoTaggingNegateHelpText', [implementationName])}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>
Required
{translate('Required')}
</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="required"
{...required}
helpText={`This ${implementationName} condition must match for the auto tagging rule to apply. Otherwise a single ${implementationName} match is sufficient.`}
helpText={translate('AutoTaggingRequiredHelpText', [implementationName])}
onChange={onInputChange}
/>
</FormGroup>
@ -157,7 +158,7 @@ function EditSpecificationModalContent(props) {
kind={kinds.DANGER}
onPress={onDeleteSpecificationPress}
>
Delete
{translate('Delete')}
</Button> :
null
}
@ -165,14 +166,14 @@ function EditSpecificationModalContent(props) {
<Button
onPress={onCancelPress}
>
Cancel
{translate('Cancel')}
</Button>
<SpinnerErrorButton
isSpinning={false}
onPress={onSavePress}
>
Save
{translate('Save')}
</SpinnerErrorButton>
</ModalFooter>
</ModalContent>

View File

@ -4,6 +4,8 @@
"Actions": "Actions",
"Activity": "Activity",
"Add": "Add",
"AddAutoTag": "Add Auto Tag",
"AddCondition": "Add Condition",
"AddCustomFormat": "Add Custom Format",
"AddDelayProfile": "Add Delay Profile",
"AddDownloadClient": "Add Download Client",
@ -73,6 +75,9 @@
"AuthenticationMethodHelpText": "Require Username and Password to access Radarr",
"Auto": "Auto",
"AutoRedownloadFailedHelpText": "Automatically search for and attempt to download a different release",
"AutoTagging": "Auto Tagging",
"AutoTaggingNegateHelpText": "If checked, the auto tagging rule will not apply if this {0} condition matches.",
"AutoTaggingRequiredHelpText": "This {0} condition must match for the auto tagging rule to apply. Otherwise a single {0} match is sufficient.",
"AutoUnmonitorPreviouslyDownloadedMoviesHelpText": "Movies deleted from the disk are automatically unmonitored in Radarr",
"Automatic": "Automatic",
"AutomaticAdd": "Automatic Add",
@ -132,6 +137,7 @@
"ClickToChangeQuality": "Click to change quality",
"ClickToChangeReleaseGroup": "Click to change release group",
"ClientPriority": "Client Priority",
"CloneAutoTag": "Clone Auto Tag",
"CloneCondition": "Clone Condition",
"CloneCustomFormat": "Clone Custom Format",
"CloneIndexer": "Clone Indexer",
@ -202,6 +208,8 @@
"DelayProfiles": "Delay Profiles",
"DelayingDownloadUntilInterp": "Delaying download until {0} at {1}",
"Delete": "Delete",
"DeleteAutoTag": "Delete Auto Tag",
"DeleteAutoTagHelpText": "Are you sure you want to delete the auto tag '{0}'?",
"DeleteBackup": "Delete Backup",
"DeleteBackupMessageText": "Are you sure you want to delete the backup '{0}'?",
"DeleteCondition": "Delete Condition",
@ -296,7 +304,9 @@
"Downloading": "Downloading",
"Duration": "Duration",
"Edit": "Edit",
"EditAutoTag": "Edit Auto Tag",
"EditCollection": "Edit Collection",
"EditCondition": "Edit Condition",
"EditCustomFormat": "Edit Custom Format",
"EditDelayProfile": "Edit Delay Profile",
"EditGroups": "Edit Groups",
@ -883,6 +893,8 @@
"RemoveSelectedItemQueueMessageText": "Are you sure you want to remove 1 item from the queue?",
"RemoveSelectedItems": "Remove Selected Items",
"RemoveSelectedItemsQueueMessageText": "Are you sure you want to remove {0} items from the queue?",
"RemoveTagsAutomatically": "Remove Tags Automatically",
"RemoveTagsAutomaticallyHelpText": "Remove tags automatically if conditions are not met",
"RemovedFromTaskQueue": "Removed from task queue",
"RemovedMovieCheckMultipleMessage": "Movies {0} were removed from TMDb",
"RemovedMovieCheckSingleMessage": "Movie {0} was removed from TMDb",
@ -1128,6 +1140,7 @@
"UnableToAddRootFolder": "Unable to add root folder",
"UnableToImportCheckLogs": "Downloaded - Unable to Import: check logs for details",
"UnableToLoadAltTitle": "Unable to load alternative titles.",
"UnableToLoadAutoTagging": "Unable to load auto tagging",
"UnableToLoadBackups": "Unable to load backups",
"UnableToLoadBlocklist": "Unable to load blocklist",
"UnableToLoadCollections": "Unable to load collections",