From b946173c050feadc473a39ee91faa72223516131 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Tue, 23 Jan 2024 05:55:33 +0100 Subject: [PATCH] Add Regular Expression Custom Format translation (cherry picked from commit 9f50166fa62a71d0a23e2c2d331651792285dc0e) Closes #9678 --- .../Specifications/EditSpecificationModalContent.js | 2 +- .../CustomFormats/Specifications/RegexSpecificationBase.cs | 2 +- src/NzbDrone.Core/Localization/Core/en.json | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/Settings/CustomFormats/CustomFormats/Specifications/EditSpecificationModalContent.js b/frontend/src/Settings/CustomFormats/CustomFormats/Specifications/EditSpecificationModalContent.js index e75895f34..0a3cefebc 100644 --- a/frontend/src/Settings/CustomFormats/CustomFormats/Specifications/EditSpecificationModalContent.js +++ b/frontend/src/Settings/CustomFormats/CustomFormats/Specifications/EditSpecificationModalContent.js @@ -49,7 +49,7 @@ function EditSpecificationModalContent(props) { {...otherProps} > { - fields && fields.some((x) => x.label === 'Regular Expression') && + fields && fields.some((x) => x.label === translate('CustomFormatsSpecificationRegularExpression')) &&
\\^$.|?*+()[{', '\\']) }} /> diff --git a/src/NzbDrone.Core/CustomFormats/Specifications/RegexSpecificationBase.cs b/src/NzbDrone.Core/CustomFormats/Specifications/RegexSpecificationBase.cs index e548d858f..1c133e383 100644 --- a/src/NzbDrone.Core/CustomFormats/Specifications/RegexSpecificationBase.cs +++ b/src/NzbDrone.Core/CustomFormats/Specifications/RegexSpecificationBase.cs @@ -21,7 +21,7 @@ namespace NzbDrone.Core.CustomFormats protected Regex _regex; protected string _raw; - [FieldDefinition(1, Label = "Regular Expression", HelpText = "Custom Format RegEx is Case Insensitive")] + [FieldDefinition(1, Label = "CustomFormatsSpecificationRegularExpression", HelpText = "CustomFormatsSpecificationRegularExpressionHelpText")] public string Value { get => _raw; diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 04cc32883..f664575b0 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -220,6 +220,8 @@ "CustomFormats": "Custom Formats", "CustomFormatsSettings": "Custom Formats Settings", "CustomFormatsSettingsSummary": "Custom Formats and Settings", + "CustomFormatsSpecificationRegularExpression": "Regular Expression", + "CustomFormatsSpecificationRegularExpressionHelpText": "Custom Format RegEx is Case Insensitive", "Cutoff": "Cutoff", "CutoffFormatScoreHelpText": "Once the quality cutoff is met or exceeded and this custom format score is reached {appName} will no longer grab or import upgrades for those movies", "CutoffHelpText": "Once this quality is reached {appName} will no longer download movies after the custom format cutoff score is met or exceeded",