1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

Add Translations to Settings Pages

This commit is contained in:
Stevie Robinson
2023-07-22 21:14:33 +02:00
committed by Mark McDowall
parent 8008610d47
commit f2c31e92ce
102 changed files with 1697 additions and 802 deletions
@@ -14,6 +14,7 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds, sizes } from 'Helpers/Props';
import dimensions from 'Styles/Variables/dimensions';
import translate from 'Utilities/String/translate';
import QualityProfileFormatItems from './QualityProfileFormatItems';
import QualityProfileItems from './QualityProfileItems';
import styles from './EditQualityProfileModalContent.css';
@@ -134,7 +135,7 @@ class EditQualityProfileModalContent extends Component {
onMeasure={this.onHeaderMeasure}
>
<ModalHeader>
{id ? 'Edit Quality Profile' : 'Add Quality Profile'}
{id ? translate('EditQualityProfile') : translate('AddQualityProfile')}
</ModalHeader>
</Measure>
@@ -151,7 +152,9 @@ class EditQualityProfileModalContent extends Component {
{
!isFetching && !!error &&
<div>Unable to add a new quality profile, please try again.</div>
<div>
{translate('AddQualityProfileError')}
</div>
}
{
@@ -163,7 +166,7 @@ class EditQualityProfileModalContent extends Component {
<div className={styles.formGroupWrapper}>
<FormGroup size={sizes.EXTRA_SMALL}>
<FormLabel size={sizes.SMALL}>
Name
{translate('Name')}
</FormLabel>
<FormInputGroup
@@ -176,14 +179,14 @@ class EditQualityProfileModalContent extends Component {
<FormGroup size={sizes.EXTRA_SMALL}>
<FormLabel size={sizes.SMALL}>
Upgrades Allowed
{translate('UpgradesAllowed')}
</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="upgradeAllowed"
{...upgradeAllowed}
helpText="If disabled qualities will not be upgraded"
helpText={translate('UpgradesAllowedHelpText')}
onChange={onInputChange}
/>
</FormGroup>
@@ -192,7 +195,7 @@ class EditQualityProfileModalContent extends Component {
upgradeAllowed.value &&
<FormGroup size={sizes.EXTRA_SMALL}>
<FormLabel size={sizes.SMALL}>
Upgrade Until
{translate('UpgradeUntil')}
</FormLabel>
<FormInputGroup
@@ -200,7 +203,7 @@ class EditQualityProfileModalContent extends Component {
name="cutoff"
{...cutoff}
values={qualities}
helpText="Once this quality is reached Sonarr will no longer download episodes"
helpText={translate('UpgradeUntilHelpText')}
onChange={onCutoffChange}
/>
</FormGroup>
@@ -210,14 +213,14 @@ class EditQualityProfileModalContent extends Component {
formatItems.value.length > 0 &&
<FormGroup size={sizes.EXTRA_SMALL}>
<FormLabel size={sizes.SMALL}>
Minimum Custom Format Score
{translate('MinimumCustomFormatScore')}
</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="minFormatScore"
{...minFormatScore}
helpText="Minimum custom format score allowed to download"
helpText={translate('MinimumCustomFormatScoreHelpText')}
onChange={onInputChange}
/>
</FormGroup>
@@ -227,14 +230,14 @@ class EditQualityProfileModalContent extends Component {
upgradeAllowed.value && formatItems.value.length > 0 &&
<FormGroup size={sizes.EXTRA_SMALL}>
<FormLabel size={sizes.SMALL}>
Upgrade Until Custom Format Score
{translate('UpgradeUntilCustomFormatScore')}
</FormLabel>
<FormInputGroup
type={inputTypes.NUMBER}
name="cutoffFormatScore"
{...cutoffFormatScore}
helpText="Once this custom format score is reached Sonarr will no longer grab episode releases"
helpText={translate('UpgradeUntilCustomFormatScoreHelpText')}
onChange={onInputChange}
/>
</FormGroup>
@@ -278,7 +281,7 @@ class EditQualityProfileModalContent extends Component {
className={styles.deleteButtonContainer}
title={
isInUse ?
'Can\'t delete a quality profile that is attached to a series' :
translate('QualityProfileInUse') :
undefined
}
>
@@ -287,7 +290,7 @@ class EditQualityProfileModalContent extends Component {
isDisabled={isInUse}
onPress={onDeleteQualityProfilePress}
>
Delete
{translate('Delete')}
</Button>
</div> :
null
@@ -296,7 +299,7 @@ class EditQualityProfileModalContent extends Component {
<Button
onPress={onModalClose}
>
Cancel
{translate('Cancel')}
</Button>
<SpinnerErrorButton
@@ -304,7 +307,7 @@ class EditQualityProfileModalContent extends Component {
error={saveError}
onPress={onSavePress}
>
Save
{translate('Save')}
</SpinnerErrorButton>
</ModalFooter>
</Measure>