fix(ui): show translated string on sonarr sucesss/failure toast messages (#1035)

pull/1053/head
Danshil Mungur 4 years ago committed by GitHub
parent 3fed26cfbe
commit eefcbcd3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,7 +185,7 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
setIsValidated(true); setIsValidated(true);
setTestResponse(response.data); setTestResponse(response.data);
if (initialLoad.current) { if (initialLoad.current) {
addToast('Sonarr connection established!', { addToast(intl.formatMessage(messages.toastSonarrTestSuccess), {
appearance: 'success', appearance: 'success',
autoDismiss: true, autoDismiss: true,
}); });
@ -193,7 +193,7 @@ const SonarrModal: React.FC<SonarrModalProps> = ({
} catch (e) { } catch (e) {
setIsValidated(false); setIsValidated(false);
if (initialLoad.current) { if (initialLoad.current) {
addToast('Failed to connect to Sonarr server', { addToast(intl.formatMessage(messages.toastSonarrTestFailure), {
appearance: 'error', appearance: 'error',
autoDismiss: true, autoDismiss: true,
}); });

Loading…
Cancel
Save