1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-19 21:46:43 -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
@@ -13,6 +13,7 @@ import ModalFooter from 'Components/Modal/ModalFooter';
import ModalHeader from 'Components/Modal/ModalHeader';
import { inputTypes, kinds } from 'Helpers/Props';
import { stringSettingShape } from 'Helpers/Props/Shapes/settingShape';
import translate from 'Utilities/String/translate';
import styles from './EditRemotePathMappingModalContent.css';
function EditRemotePathMappingModalContent(props) {
@@ -40,7 +41,7 @@ function EditRemotePathMappingModalContent(props) {
return (
<ModalContent onModalClose={onModalClose}>
<ModalHeader>
{id ? 'Edit Remote Path Mapping' : 'Add Remote Path Mapping'}
{id ? translate('EditRemotePathMapping') : translate('AddRemotePathMapping')}
</ModalHeader>
<ModalBody className={styles.body}>
@@ -51,19 +52,21 @@ function EditRemotePathMappingModalContent(props) {
{
!isFetching && !!error &&
<div>Unable to add a new remote path mapping, please try again.</div>
<div>
{translate('AddRemotePathMappingError')}
</div>
}
{
!isFetching && !error &&
<Form {...otherProps}>
<FormGroup>
<FormLabel>Host</FormLabel>
<FormLabel>{translate('Host')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="host"
helpText="The same host you specified for the remote Download Client"
helpText={translate('RemotePathMappingHostHelpText')}
{...host}
values={downloadClientHosts}
onChange={onInputChange}
@@ -71,24 +74,24 @@ function EditRemotePathMappingModalContent(props) {
</FormGroup>
<FormGroup>
<FormLabel>Remote Path</FormLabel>
<FormLabel>{translate('RemotePath')}</FormLabel>
<FormInputGroup
type={inputTypes.TEXT}
name="remotePath"
helpText="Root path to the directory that the Download Client accesses"
helpText={translate('RemotePathMappingRemotePathHelpText')}
{...remotePath}
onChange={onInputChange}
/>
</FormGroup>
<FormGroup>
<FormLabel>Local Path</FormLabel>
<FormLabel>{translate('LocalPath')}</FormLabel>
<FormInputGroup
type={inputTypes.PATH}
name="localPath"
helpText="Path that Sonarr should use to access the remote path locally"
helpText={translate('RemotePathMappingLocalPathHelpText')}
{...localPath}
onChange={onInputChange}
/>
@@ -105,14 +108,14 @@ function EditRemotePathMappingModalContent(props) {
kind={kinds.DANGER}
onPress={onDeleteRemotePathMappingPress}
>
Delete
{translate('Delete')}
</Button>
}
<Button
onPress={onModalClose}
>
Cancel
{translate('Cancel')}
</Button>
<SpinnerErrorButton
@@ -120,7 +123,7 @@ function EditRemotePathMappingModalContent(props) {
error={saveError}
onPress={onSavePress}
>
Save
{translate('Save')}
</SpinnerErrorButton>
</ModalFooter>
</ModalContent>