1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

Translate Notifications settings

This commit is contained in:
Stevie Robinson
2024-01-03 21:41:16 +01:00
committed by GitHub
parent cd2ce34f10
commit 8f7f23c938
52 changed files with 457 additions and 194 deletions
@@ -2,6 +2,7 @@ using System.Collections.Generic;
using FluentValidation.Results;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Localization;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Tv;
using NzbDrone.Core.Validation;
@@ -12,8 +13,8 @@ namespace NzbDrone.Core.Notifications.Webhook
{
private readonly IWebhookProxy _proxy;
public Webhook(IWebhookProxy proxy, IConfigFileProvider configFileProvider, IConfigService configService)
: base(configFileProvider, configService)
public Webhook(IWebhookProxy proxy, IConfigFileProvider configFileProvider, IConfigService configService, ILocalizationService localizationService)
: base(configFileProvider, configService, localizationService)
{
_proxy = proxy;
}
@@ -89,7 +90,7 @@ namespace NzbDrone.Core.Notifications.Webhook
}
catch (WebhookException ex)
{
return new NzbDroneValidationFailure("Url", ex.Message);
return new NzbDroneValidationFailure("Url", _localizationService.GetLocalizedString("NotificationsValidationUnableToSendTestMessage", new Dictionary<string, object> { { "exceptionMessage", ex.Message } }));
}
return null;