New: Separate UI Language into two settings for Movie Info and Main UI

pull/4664/head
Qstick 4 years ago
parent 2014ff6610
commit ecbdd58f42

@ -117,7 +117,7 @@ const links = [
to: '/settings/general'
},
{
title: translate('Ui'),
title: translate('UI'),
to: '/settings/ui'
}
]

@ -196,17 +196,30 @@ class UISettings extends Component {
<FieldSet legend={translate('Language')}>
<FormGroup>
<FormLabel>{translate('SettingsUiLanguage')}</FormLabel>
<FormLabel>{translate('MovieInfoLanguage')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="movieInfoLanguage"
values={languages}
helpText={translate('SettingsUiLanguageHelpText')}
helpText={translate('MovieInfoLanguageHelpText')}
helpTextWarning={translate('MovieInfoLanguageHelpTextWarning')}
onChange={onInputChange}
{...settings.movieInfoLanguage}
/>
</FormGroup>
<FormGroup>
<FormLabel>{translate('UILanguage')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="uiLanguage"
values={languages}
helpText={translate('UILanguageHelpText')}
helpTextWarning={translate('UILanguageHelpTextWarning')}
onChange={onInputChange}
{...settings.uiLanguage}
/>
</FormGroup>
</FieldSet>
</Form>
}

@ -386,6 +386,13 @@ namespace NzbDrone.Core.Configuration
set { SetValue("MovieInfoLanguage", value); }
}
public int UILanguage
{
get { return GetValueInt("UILanguage", (int)Language.English); }
set { SetValue("UILanguage", value); }
}
public bool CleanupMetadataImages
{
get { return GetValueBoolean("CleanupMetadataImages", true); }

@ -77,6 +77,7 @@ namespace NzbDrone.Core.Configuration
bool ShowRelativeDates { get; set; }
bool EnableColorImpairedMode { get; set; }
int MovieInfoLanguage { get; set; }
int UILanguage { get; set; }
//Internal
bool CleanupMetadataImages { get; set; }

@ -116,12 +116,12 @@
"Crew": "Crew",
"CustomFilters": "Custom Filters",
"CustomFormatJSON": "Custom Format JSON",
"CustomFormatUnknownCondition": "Unknown Custom Format condition '{0}'",
"CustomFormatUnknownConditionOption": "Unknown option '{0}' for condition '{1}'",
"CustomFormats": "Custom Formats",
"CustomFormatScore": "Custom Format score",
"CustomFormatsSettings": "Custom Formats Settings",
"CustomFormatsSettingsSummary": "Custom Formats and Settings",
"CustomFormatUnknownCondition": "Unknown Custom Format condition '{0}'",
"CustomFormatUnknownConditionOption": "Unknown option '{0}' for condition '{1}'",
"Cutoff": "Cutoff",
"CutoffFormatScoreHelpText": "Once this custom format score is reached Radarr will no longer download movies",
"CutoffHelpText": "Once this quality is reached Radarr will no longer download movies",
@ -413,6 +413,8 @@
"MovieFolderFormat": "Movie Folder Format",
"MovieID": "Movie ID",
"MovieIndex": "Movie Index",
"MovieInfoLanguage": "Movie Info Language",
"MovieInfoLanguageHelpText": "Language that Radarr will use for Movie Information in UI",
"MovieInfoLanguageHelpTextWarning": "Browser Reload Required",
"MovieIsDownloading": "Movie is downloading",
"MovieIsDownloadingInterp": "Movie is downloading - {0}% {1}",
@ -635,8 +637,6 @@
"SettingsShowRelativeDates": "Show Relative Dates",
"SettingsShowRelativeDatesHelpText": "Show relative (Today/Yesterday/etc) or absolute dates",
"SettingsTimeFormat": "Time Format",
"SettingsUiLanguage": "UI Language",
"SettingsUiLanguageHelpText": "Language that Radarr will use for UI",
"SettingsWeekColumnHeader": "Week Column Header",
"SettingsWeekColumnHeaderHelpText": "Shown above each column when week is the active view",
"ShouldMonitorHelpText": "If enabled, movies added by this list are added and monitored",
@ -718,6 +718,9 @@
"TotalSpace": "Total Space",
"Type": "Type",
"UI": "UI",
"UILanguage": "UI Language",
"UILanguageHelpText": "Language that Radarr will use for UI",
"UILanguageHelpTextWarning": "Browser Reload Required",
"UISettings": "UI Settings",
"UISettingsSummary": "Calendar, date and color impaired options",
"UnableToAddANewConditionPleaseTryAgain": "Unable to add a new condition, please try again.",

@ -45,14 +45,14 @@ namespace NzbDrone.Core.Localization
public Dictionary<string, string> GetLocalizationDictionary()
{
var language = IsoLanguages.Get((Language)_configService.MovieInfoLanguage).TwoLetterCode;
var language = IsoLanguages.Get((Language)_configService.UILanguage).TwoLetterCode;
return GetLocalizationDictionary(language);
}
public string GetLocalizedString(string phrase)
{
var language = IsoLanguages.Get((Language)_configService.MovieInfoLanguage).TwoLetterCode;
var language = IsoLanguages.Get((Language)_configService.UILanguage).TwoLetterCode;
return GetLocalizedString(phrase, language);
}
@ -66,7 +66,7 @@ namespace NzbDrone.Core.Localization
if (language.IsNullOrWhiteSpace())
{
language = IsoLanguages.Get((Language)_configService.MovieInfoLanguage).TwoLetterCode;
language = IsoLanguages.Get((Language)_configService.UILanguage).TwoLetterCode;
}
if (language == null)

@ -20,6 +20,7 @@ namespace Radarr.Api.V3.Config
public bool EnableColorImpairedMode { get; set; }
public int MovieInfoLanguage { get; set; }
public int UILanguage { get; set; }
}
public static class UiConfigResourceMapper
@ -39,7 +40,8 @@ namespace Radarr.Api.V3.Config
ShowRelativeDates = model.ShowRelativeDates,
EnableColorImpairedMode = model.EnableColorImpairedMode,
MovieInfoLanguage = model.MovieInfoLanguage
MovieInfoLanguage = model.MovieInfoLanguage,
UILanguage = model.UILanguage
};
}
}

Loading…
Cancel
Save