mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Localization Framework
This commit is contained in:
parent
99ccaab6a6
commit
729a876fc7
23 changed files with 811 additions and 32 deletions
|
@ -10,6 +10,7 @@ import PageContent from 'Components/Page/PageContent';
|
|||
import PageContentBody from 'Components/Page/PageContentBody';
|
||||
import { inputTypes } from 'Helpers/Props';
|
||||
import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './UISettings.css';
|
||||
|
||||
export const firstDayOfWeekOptions = [
|
||||
|
@ -56,9 +57,12 @@ class UISettings extends Component {
|
|||
hasSettings,
|
||||
onInputChange,
|
||||
onSavePress,
|
||||
languages,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
const uiLanguages = languages.filter((item) => item.value !== 'Original');
|
||||
|
||||
return (
|
||||
<PageContent title="UI Settings">
|
||||
<SettingsToolbarConnector
|
||||
|
@ -220,6 +224,20 @@ class UISettings extends Component {
|
|||
</div>
|
||||
</FormGroup>
|
||||
</FieldSet>
|
||||
<FieldSet legend={translate('Language')}>
|
||||
<FormGroup>
|
||||
<FormLabel>{translate('UILanguage')}</FormLabel>
|
||||
<FormInputGroup
|
||||
type={inputTypes.SELECT}
|
||||
name="uiLanguage"
|
||||
values={uiLanguages}
|
||||
helpText={translate('UILanguageHelpText')}
|
||||
helpTextWarning={translate('UILanguageHelpTextWarning')}
|
||||
onChange={onInputChange}
|
||||
{...settings.uiLanguage}
|
||||
/>
|
||||
</FormGroup>
|
||||
</FieldSet>
|
||||
</Form>
|
||||
}
|
||||
</PageContentBody>
|
||||
|
@ -235,6 +253,7 @@ UISettings.propTypes = {
|
|||
settings: PropTypes.object.isRequired,
|
||||
hasSettings: PropTypes.bool.isRequired,
|
||||
onSavePress: PropTypes.func.isRequired,
|
||||
languages: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onInputChange: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue