1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

improve connect error messages

This commit is contained in:
Luke Pulverenti 2016-04-10 17:11:06 -04:00
parent ca2375cf4f
commit 20a9c83bf6
4 changed files with 63 additions and 2347 deletions

View file

@ -62,6 +62,47 @@
showNewUserInviteMessage(dlg, result); showNewUserInviteMessage(dlg, result);
}, function (response) {
Dashboard.hideLoadingMsg();
if (!response.status) {
// General error
require(['alert'], function (alert) {
alert({
text: Globalize.translate('DefaultErrorMessage')
});
});
} else if (response.status == 404) {
// User doesn't exist
require(['alert'], function (alert) {
alert({
text: Globalize.translate('GuestUserNotFound')
});
});
} else {
// status 400 = account not activated
// General error
showAccountErrorMessage();
}
});
});
}
function showAccountErrorMessage() {
var html = Globalize.translate('ErrorAddingGuestAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
html += '<br/><br/>' + Globalize.translate('ErrorAddingGuestAccount2', 'apps@emby.media');
var text = Globalize.translate('ErrorAddingGuestAccount1', 'https://emby.media/connect');
text += '\n\n' + Globalize.translate('ErrorAddingGuestAccount2', 'apps@emby.media');
require(['alert'], function (alert) {
alert({
text: text,
html: html
}); });
}); });
} }
@ -78,9 +119,11 @@
Globalize.translate('MessageInvitationSentToNewUser', result.GuestDisplayName) : Globalize.translate('MessageInvitationSentToNewUser', result.GuestDisplayName) :
Globalize.translate('MessageInvitationSentToUser', result.GuestDisplayName); Globalize.translate('MessageInvitationSentToUser', result.GuestDisplayName);
Dashboard.alert({ require(['alert'], function (alert) {
message: message, alert({
title: Globalize.translate('HeaderInvitationSent') text: message,
title: Globalize.translate('HeaderInvitationSent')
});
}); });
} }

View file

@ -123,21 +123,26 @@
} }
} function showEmbyConnectErrorMessage(username) { } function showEmbyConnectErrorMessage(username) {
var msg; var html;
var text;
if (username) { if (username) {
msg = Globalize.translate('ErrorAddingEmbyConnectAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>'); html = Globalize.translate('ErrorAddingEmbyConnectAccount1', '<a href="https://emby.media/connect" target="_blank">https://emby.media/connect</a>');
msg += '<br/><br/>' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media'); html += '<br/><br/>' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
text = Globalize.translate('ErrorAddingEmbyConnectAccount1', 'https://emby.media/connect');
text += '\n\n' + Globalize.translate('ErrorAddingEmbyConnectAccount2', 'apps@emby.media');
} else { } else {
msg = Globalize.translate('DefaultErrorMessage'); html = text = Globalize.translate('DefaultErrorMessage');
} }
Dashboard.alert({ require(['alert'], function (alert) {
alert({
message: msg text: text,
html: html
});
}); });
} }

View file

@ -2331,5 +2331,8 @@
"ConfigureDateAdded": "Configure how date added is determined in the Emby Server dashboard under Library settings", "ConfigureDateAdded": "Configure how date added is determined in the Emby Server dashboard under Library settings",
"LabelAllowHWTranscoding": "Allow hardware transcoding", "LabelAllowHWTranscoding": "Allow hardware transcoding",
"AllowHWTranscodingHelp": "If enabled, allow the tuner to transcode streams on the fly. This may help reduce transcoding required by Emby Server.", "AllowHWTranscodingHelp": "If enabled, allow the tuner to transcode streams on the fly. This may help reduce transcoding required by Emby Server.",
"OptionRequirePerfectSubtitleMatch": "Only download subtitles that are a perfect match for my video files" "OptionRequirePerfectSubtitleMatch": "Only download subtitles that are a perfect match for my video files",
"ErrorAddingGuestAccount1": "There was an error adding the Emby Connect account. Has your guest created an Emby account? They can sign up at {0}.",
"ErrorAddingGuestAccount2": "Please ensure your guest has completed activation by following the instructions in the email sent after creating the account. If they did not receive this email then please send an email to {0}, and include your email address as well as theirs.",
"GuestUserNotFound": "User not found. Please ensure the name is correct and try again, or try entering their email address."
} }

File diff suppressed because it is too large Load diff