mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-17 21:26:22 -04:00
New: Separate UI Language into two settings for Movie Info and Main UI
This commit is contained in:
@@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user