mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Translate backend: Autotagging + CF specs
Signed-off-by: Stevie Robinson <stevie.robinson@gmail.com> (cherry picked from commit de1cc25c903924fecbca79fedb458d729ae584fd) Towards #9647
This commit is contained in:
parent
f507d5154e
commit
f8704a1655
14 changed files with 40 additions and 17 deletions
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Genre";
|
||||
|
||||
[FieldDefinition(1, Label = "Genre(s)", Type = FieldType.Tag)]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationGenre", Type = FieldType.Tag)]
|
||||
public IEnumerable<string> Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Original Language";
|
||||
|
||||
[FieldDefinition(1, Label = "Language", Type = FieldType.Select, SelectOptions = typeof(OriginalLanguageFieldConverter))]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationOriginalLanguage", Type = FieldType.Select, SelectOptions = typeof(OriginalLanguageFieldConverter))]
|
||||
public int Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Quality Profile";
|
||||
|
||||
[FieldDefinition(1, Label = "Quality Profile", Type = FieldType.QualityProfile)]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationQualityProfile", Type = FieldType.QualityProfile)]
|
||||
public int Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Root Folder";
|
||||
|
||||
[FieldDefinition(1, Label = "Root Folder", Type = FieldType.RootFolder)]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationRootFolder", Type = FieldType.RootFolder)]
|
||||
public string Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -24,10 +24,10 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Runtime";
|
||||
|
||||
[FieldDefinition(1, Label = "Minimum Runtime", Type = FieldType.Number)]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationMinimumRuntime", Type = FieldType.Number, Unit = "minutes")]
|
||||
public int Min { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Maximum Runtime", Type = FieldType.Number)]
|
||||
[FieldDefinition(2, Label = "AutoTaggingSpecificationMaximumRuntime", Type = FieldType.Number, Unit = "minutes")]
|
||||
public int Max { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -23,10 +23,10 @@ namespace NzbDrone.Core.AutoTagging.Specifications
|
|||
public override int Order => 1;
|
||||
public override string ImplementationName => "Year";
|
||||
|
||||
[FieldDefinition(1, Label = "Minimum Year", Type = FieldType.Number)]
|
||||
[FieldDefinition(1, Label = "AutoTaggingSpecificationMinimumYear", Type = FieldType.Number)]
|
||||
public int Min { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Maximum Year", Type = FieldType.Number)]
|
||||
[FieldDefinition(2, Label = "AutoTaggingSpecificationMaximumYear", Type = FieldType.Number)]
|
||||
public int Max { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(Movie movie)
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 3;
|
||||
public override string ImplementationName => "Language";
|
||||
|
||||
[FieldDefinition(1, Label = "Language", Type = FieldType.Select, SelectOptions = typeof(LanguageFieldConverter))]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationLanguage", Type = FieldType.Select, SelectOptions = typeof(LanguageFieldConverter))]
|
||||
public int Value { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationExceptLanguage", HelpText = "CustomFormatsSpecificationExceptLanguageHelpText", Type = FieldType.Checkbox)]
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 7;
|
||||
public override string ImplementationName => "Quality Modifier";
|
||||
|
||||
[FieldDefinition(1, Label = "Quality Modifier", Type = FieldType.Select, SelectOptions = typeof(Modifier))]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationQualityModifier", Type = FieldType.Select, SelectOptions = typeof(Modifier))]
|
||||
public int Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 6;
|
||||
public override string ImplementationName => "Resolution";
|
||||
|
||||
[FieldDefinition(1, Label = "Resolution", Type = FieldType.Select, SelectOptions = typeof(Resolution))]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationResolution", Type = FieldType.Select, SelectOptions = typeof(Resolution))]
|
||||
public int Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
|
||||
|
|
|
@ -21,10 +21,10 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 8;
|
||||
public override string ImplementationName => "Size";
|
||||
|
||||
[FieldDefinition(1, Label = "Minimum Size", HelpText = "Release must be greater than this size", Unit = "GB", Type = FieldType.Number)]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationMinimumSize", HelpText = "CustomFormatsSpecificationMinimumSizeHelpText", Unit = "GB", Type = FieldType.Number)]
|
||||
public double Min { get; set; }
|
||||
|
||||
[FieldDefinition(1, Label = "Maximum Size", HelpText = "Release must be less than or equal to this size", Unit = "GB", Type = FieldType.Number)]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationMaximumSize", HelpText = "CustomFormatsSpecificationMaximumSizeHelpText", Unit = "GB", Type = FieldType.Number)]
|
||||
public double Max { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 5;
|
||||
public override string ImplementationName => "Source";
|
||||
|
||||
[FieldDefinition(1, Label = "Source", Type = FieldType.Select, SelectOptions = typeof(QualitySource))]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationSource", Type = FieldType.Select, SelectOptions = typeof(QualitySource))]
|
||||
public int Value { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
|
||||
|
|
|
@ -20,10 +20,10 @@ namespace NzbDrone.Core.CustomFormats
|
|||
public override int Order => 10;
|
||||
public override string ImplementationName => "Year";
|
||||
|
||||
[FieldDefinition(1, Label = "Minimum Year", Type = FieldType.Number)]
|
||||
[FieldDefinition(1, Label = "CustomFormatsSpecificationMinimumYear", Type = FieldType.Number)]
|
||||
public int Min { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Maximum Year", Type = FieldType.Number)]
|
||||
[FieldDefinition(2, Label = "CustomFormatsSpecificationMaximumYear", Type = FieldType.Number)]
|
||||
public int Max { get; set; }
|
||||
|
||||
protected override bool IsSatisfiedByWithoutNegate(CustomFormatInput input)
|
||||
|
|
|
@ -116,6 +116,14 @@
|
|||
"AutoTaggingLoadError": "Unable to load auto tagging",
|
||||
"AutoTaggingNegateHelpText": "If checked, the auto tagging rule will not apply if this {implementationName} condition matches.",
|
||||
"AutoTaggingRequiredHelpText": "This {implementationName} condition must match for the auto tagging rule to apply. Otherwise a single {implementationName} match is sufficient.",
|
||||
"AutoTaggingSpecificationGenre": "Genre(s)",
|
||||
"AutoTaggingSpecificationMaximumRuntime": "Maximum Runtime",
|
||||
"AutoTaggingSpecificationMaximumYear": "Maximum Year",
|
||||
"AutoTaggingSpecificationMinimumRuntime": "Minimum Runtime",
|
||||
"AutoTaggingSpecificationMinimumYear": "Minimum Year",
|
||||
"AutoTaggingSpecificationOriginalLanguage": "Language",
|
||||
"AutoTaggingSpecificationQualityProfile": "Quality Profile",
|
||||
"AutoTaggingSpecificationRootFolder": "Root Folder",
|
||||
"AutoTaggingSpecificationTag": "Tag",
|
||||
"AutoUnmonitorPreviouslyDownloadedMoviesHelpText": "Movies deleted from the disk are automatically unmonitored in {appName}",
|
||||
"Automatic": "Automatic",
|
||||
|
@ -270,8 +278,18 @@
|
|||
"CustomFormatsSpecificationExceptLanguage": "Except Language",
|
||||
"CustomFormatsSpecificationExceptLanguageHelpText": "Matches if any language other than the selected language is present",
|
||||
"CustomFormatsSpecificationFlag": "Flag",
|
||||
"CustomFormatsSpecificationLanguage": "Language",
|
||||
"CustomFormatsSpecificationMaximumSize": "Maximum Size",
|
||||
"CustomFormatsSpecificationMaximumSizeHelpText": "Release must be less than or equal to this size",
|
||||
"CustomFormatsSpecificationMaximumYear": "Maximum Year",
|
||||
"CustomFormatsSpecificationMinimumSize": "Minimum Size",
|
||||
"CustomFormatsSpecificationMinimumSizeHelpText": "Release must be greater than this size",
|
||||
"CustomFormatsSpecificationMinimumYear": "Minimum Year",
|
||||
"CustomFormatsSpecificationQualityModifier": "Quality Modifier",
|
||||
"CustomFormatsSpecificationRegularExpression": "Regular Expression",
|
||||
"CustomFormatsSpecificationRegularExpressionHelpText": "Custom Format RegEx is Case Insensitive",
|
||||
"CustomFormatsSpecificationResolution": "Resolution",
|
||||
"CustomFormatsSpecificationSource": "Source",
|
||||
"Cutoff": "Cutoff",
|
||||
"CutoffNotMet": "Cutoff Not Met",
|
||||
"CutoffUnmet": "Cutoff Unmet",
|
||||
|
|
|
@ -228,10 +228,15 @@ namespace Radarr.Http.ClientSchema
|
|||
|
||||
if (attrib != null)
|
||||
{
|
||||
var label = attrib.Label.IsNotNullOrWhiteSpace()
|
||||
? _localizationService.GetLocalizedString(attrib.Label,
|
||||
GetTokens(selectOptions, attrib.Label, TokenField.Label))
|
||||
: attrib.Label;
|
||||
|
||||
return new SelectOption
|
||||
{
|
||||
Value = value,
|
||||
Name = attrib.Label ?? name,
|
||||
Name = label ?? name,
|
||||
Order = attrib.Order,
|
||||
Hint = attrib.Hint ?? $"({value})"
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue