From 4a5cd2098b153f0a2d2521b9723e740b16c5856f 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 #4506 --- .../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 d55bbcdf9..02a31eda7 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')) &&
\\^$.|?*+()[{ have special meanings and need escaping with a \\' }} /> 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 1859aaada..cc40d2d77 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -239,6 +239,8 @@ "CustomFormatScore": "Custom Format Score", "CustomFormatSettings": "Custom Format Settings", "CustomFormats": "Custom Formats", + "CustomFormatsSpecificationRegularExpression": "Regular Expression", + "CustomFormatsSpecificationRegularExpressionHelpText": "Custom Format RegEx is Case Insensitive", "Customformat": "Custom Format", "CutoffFormatScoreHelpText": "Once this custom format score is reached {appName} will no longer grab album releases", "CutoffHelpText": "Once this quality is reached {appName} will no longer download albums",