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

fix a common error message and update some strings

This commit is contained in:
dkanada 2020-09-02 14:54:54 +09:00
parent 692a35c5a4
commit 459d6907d5
4 changed files with 36 additions and 35 deletions

View file

@ -639,22 +639,18 @@ function supportsDirectPlay(apiClient, item, mediaSource) {
function validatePlaybackInfoResult(instance, result) { function validatePlaybackInfoResult(instance, result) {
if (result.ErrorCode) { if (result.ErrorCode) {
showPlaybackInfoErrorMessage(instance, result.ErrorCode); showPlaybackInfoErrorMessage(instance, 'PlaybackError' + result.ErrorCode);
return false; return false;
} }
return true; return true;
} }
function showPlaybackInfoErrorMessage(instance, errorCode, playNextTrack) { function showPlaybackInfoErrorMessage(instance, errorCode) {
import('alert').then(({ default: alert }) => { import('alert').then(({ default: alert }) => {
alert({ alert({
text: globalize.translate('PlaybackError' + errorCode), text: globalize.translate(errorCode),
title: globalize.translate('HeaderPlaybackError') title: globalize.translate('HeaderPlaybackError')
}).then(function () {
if (playNextTrack) {
instance.nextTrack();
}
}); });
}); });
} }
@ -1701,7 +1697,7 @@ class PlaybackManager {
streamInfo.lastMediaInfoQuery = lastMediaInfoQuery; streamInfo.lastMediaInfoQuery = lastMediaInfoQuery;
if (!streamInfo.url) { if (!streamInfo.url) {
showPlaybackInfoErrorMessage(self, 'NoCompatibleStream', true); showPlaybackInfoErrorMessage(self, 'PlaybackErrorNoCompatibleStream');
return; return;
} }
@ -2061,7 +2057,7 @@ class PlaybackManager {
// If it's still null then there's nothing to play // If it's still null then there's nothing to play
if (!firstItem) { if (!firstItem) {
showPlaybackInfoErrorMessage(self, 'NoCompatibleStream', false); showPlaybackInfoErrorMessage(self, 'PlaybackErrorNoCompatibleStream');
return Promise.reject(); return Promise.reject();
} }
@ -2110,7 +2106,7 @@ class PlaybackManager {
function playInternal(item, playOptions, onPlaybackStartedFn) { function playInternal(item, playOptions, onPlaybackStartedFn) {
if (item.IsPlaceHolder) { if (item.IsPlaceHolder) {
loading.hide(); loading.hide();
showPlaybackInfoErrorMessage(self, 'PlaceHolder', true); showPlaybackInfoErrorMessage(self, 'PlaybackErrorPlaceHolder');
return Promise.reject(); return Promise.reject();
} }
@ -2479,7 +2475,7 @@ class PlaybackManager {
return mediaSource; return mediaSource;
} }
} else { } else {
showPlaybackInfoErrorMessage(self, 'NoCompatibleStream'); showPlaybackInfoErrorMessage(self, 'PlaybackErrorNoCompatibleStream');
return Promise.reject(); return Promise.reject();
} }
}); });
@ -2968,7 +2964,7 @@ class PlaybackManager {
} }
if (displayErrorCode && typeof (displayErrorCode) === 'string') { if (displayErrorCode && typeof (displayErrorCode) === 'string') {
showPlaybackInfoErrorMessage(self, displayErrorCode, nextItem); showPlaybackInfoErrorMessage(self, 'PlaybackError' + displayErrorCode);
} else if (nextItem) { } else if (nextItem) {
self.nextTrack(); self.nextTrack();
} else { } else {

View file

@ -33,11 +33,11 @@
</label> </label>
<label> <label>
<input is="emby-checkbox" type="checkbox" id="chkPhoto" data-value="Photo" class="chkMediaType" /> <input is="emby-checkbox" type="checkbox" id="chkPhoto" data-value="Photo" class="chkMediaType" />
<span>${OptionProfilePhoto}</span> <span>${Photo}</span>
</label> </label>
<label> <label>
<input is="emby-checkbox" type="checkbox" id="chkVideo" data-value="Video" class="chkMediaType" /> <input is="emby-checkbox" type="checkbox" id="chkVideo" data-value="Video" class="chkMediaType" />
<span>${OptionProfileVideo}</span> <span>${Video}</span>
</label> </label>
</div> </div>
</div> </div>
@ -144,19 +144,19 @@
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<input type="number" is="emby-input" id="txtAlbumArtMaxWidth" pattern="[0-9]*" min="1" label="${LabelAlbumArtMaxWidth}" /> <input type="number" is="emby-input" id="txtAlbumArtMaxWidth" pattern="[0-9]*" min="1" label="${LabelAlbumArtMaxWidth}" />
<div class="fieldDescription">${LabelAlbumArtMaxWidthHelp}</div> <div class="fieldDescription">${LabelAlbumArtMaxResHelp}</div>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<input type="number" is="emby-input" id="txtAlbumArtMaxHeight" pattern="[0-9]*" min="1" label="${LabelAlbumArtMaxHeight}" /> <input type="number" is="emby-input" id="txtAlbumArtMaxHeight" pattern="[0-9]*" min="1" label="${LabelAlbumArtMaxHeight}" />
<div class="fieldDescription">${LabelAlbumArtMaxHeightHelp}</div> <div class="fieldDescription">${LabelAlbumArtMaxResHelp}</div>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<input type="number" is="emby-input" id="txtIconMaxWidth" pattern="[0-9]*" min="1" label="${LabelIconMaxWidth}" /> <input type="number" is="emby-input" id="txtIconMaxWidth" pattern="[0-9]*" min="1" label="${LabelIconMaxWidth}" />
<div class="fieldDescription">${LabelIconMaxWidthHelp}</div> <div class="fieldDescription">${LabelIconMaxResHelp}</div>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
<input type="number" is="emby-input" id="txtIconMaxHeight" pattern="[0-9]*" min="1" label="${LabelIconMaxHeight}" /> <input type="number" is="emby-input" id="txtIconMaxHeight" pattern="[0-9]*" min="1" label="${LabelIconMaxHeight}" />
<div class="fieldDescription">${LabelIconMaxHeightHelp}</div> <div class="fieldDescription">${LabelIconMaxResHelp}</div>
</div> </div>
</div> </div>
</div> </div>
@ -280,8 +280,8 @@
<div class="selectContainer"> <div class="selectContainer">
<select id="selectDirectPlayProfileType" name="selectDirectPlayProfileType" is="emby-select" label="${LabelType}"> <select id="selectDirectPlayProfileType" name="selectDirectPlayProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option> <option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option> <option value="Photo">${Photo}</option>
<option value="Video">${OptionProfileVideo}</option> <option value="Video">${Video}</option>
</select> </select>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
@ -328,8 +328,8 @@
<div class="selectContainer"> <div class="selectContainer">
<select id="selectTranscodingProfileType" name="selectTranscodingProfileType" is="emby-select" label="${LabelType}"> <select id="selectTranscodingProfileType" name="selectTranscodingProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option> <option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option> <option value="Photo">${Photo}</option>
<option value="Video">${OptionProfileVideo}</option> <option value="Video">${Video}</option>
</select> </select>
</div> </div>
<div id="fldTranscodingProtocol" style="margin: 1em 0;"> <div id="fldTranscodingProtocol" style="margin: 1em 0;">
@ -404,8 +404,8 @@
<div class="selectContainer"> <div class="selectContainer">
<select id="selectContainerProfileType" name="selectContainerProfileType" is="emby-select" label="${LabelType}"> <select id="selectContainerProfileType" name="selectContainerProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option> <option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option> <option value="Photo">${Photo}</option>
<option value="Video">${OptionProfileVideo}</option> <option value="Video">${Video}</option>
</select> </select>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">
@ -434,8 +434,8 @@
<p>${HeaderCodecProfileHelp}</p> <p>${HeaderCodecProfileHelp}</p>
<div class="selectContainer"> <div class="selectContainer">
<select id="selectCodecProfileType" name="selectCodecProfileType" is="emby-select" label="${LabelType}"> <select id="selectCodecProfileType" name="selectCodecProfileType" is="emby-select" label="${LabelType}">
<option value="Video">${OptionProfileVideo}</option> <option value="Video">${Video}</option>
<option value="VideoAudio">${OptionProfileVideoAudio}</option> <option value="VideoAudio">${VideoAudio}</option>
<option value="Audio">${Audio}</option> <option value="Audio">${Audio}</option>
</select> </select>
</div> </div>
@ -463,8 +463,8 @@
<div class="selectContainer"> <div class="selectContainer">
<select id="selectResponseProfileType" name="selectResponseProfileType" is="emby-select" label="${LabelType}"> <select id="selectResponseProfileType" name="selectResponseProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option> <option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option> <option value="Photo">${Photo}</option>
<option value="Video">${OptionProfileVideo}</option> <option value="Video">${Video}</option>
</select> </select>
</div> </div>
<div class="inputContainer"> <div class="inputContainer">

View file

@ -218,29 +218,29 @@ import 'emby-itemrefreshindicator';
name: '', name: '',
value: '' value: ''
}, { }, {
name: globalize.translate('FolderTypeMovies'), name: globalize.translate('Movies'),
value: 'movies', value: 'movies',
message: getLink('MovieLibraryHelp', 'https://docs.jellyfin.org/general/server/media/movies.html') message: getLink('MovieLibraryHelp', 'https://docs.jellyfin.org/general/server/media/movies.html')
}, { }, {
name: globalize.translate('FolderTypeMusic'), name: globalize.translate('TabMusic'),
value: 'music', value: 'music',
message: getLink('MusicLibraryHelp', 'https://docs.jellyfin.org/general/server/media/music.html') message: getLink('MusicLibraryHelp', 'https://docs.jellyfin.org/general/server/media/music.html')
}, { }, {
name: globalize.translate('FolderTypeTvShows'), name: globalize.translate('Shows'),
value: 'tvshows', value: 'tvshows',
message: getLink('TvLibraryHelp', 'https://docs.jellyfin.org/general/server/media/shows.html') message: getLink('TvLibraryHelp', 'https://docs.jellyfin.org/general/server/media/shows.html')
}, { }, {
name: globalize.translate('FolderTypeBooks'), name: globalize.translate('Books'),
value: 'books', value: 'books',
message: getLink('BookLibraryHelp', 'https://docs.jellyfin.org/general/server/media/books.html') message: getLink('BookLibraryHelp', 'https://docs.jellyfin.org/general/server/media/books.html')
}, { }, {
name: globalize.translate('Photos'), name: globalize.translate('Photos'),
value: 'homevideos' value: 'homevideos'
}, { }, {
name: globalize.translate('FolderTypeMusicVideos'), name: globalize.translate('MusicVideos'),
value: 'musicvideos' value: 'musicvideos'
}, { }, {
name: globalize.translate('FolderTypeUnset'), name: globalize.translate('Other'),
value: 'mixed', value: 'mixed',
message: globalize.translate('MessageUnsetContentHelp') message: globalize.translate('MessageUnsetContentHelp')
}]; }];
@ -326,7 +326,7 @@ import 'emby-itemrefreshindicator';
let typeName = getCollectionTypeOptions().filter(function (t) { let typeName = getCollectionTypeOptions().filter(function (t) {
return t.value == virtualFolder.CollectionType; return t.value == virtualFolder.CollectionType;
})[0]; })[0];
typeName = typeName ? typeName.name : globalize.translate('FolderTypeUnset'); typeName = typeName ? typeName.name : globalize.translate('Other');
html += "<div class='cardText cardText-secondary'>"; html += "<div class='cardText cardText-secondary'>";
if (virtualFolder.showType === false) { if (virtualFolder.showType === false) {

View file

@ -244,6 +244,7 @@
"General": "General", "General": "General",
"Genre": "Genre", "Genre": "Genre",
"Genres": "Genres", "Genres": "Genres",
"Other": "Other",
"GroupBySeries": "Group by series", "GroupBySeries": "Group by series",
"GroupVersions": "Group versions", "GroupVersions": "Group versions",
"GuestStar": "Guest star", "GuestStar": "Guest star",
@ -467,6 +468,7 @@
"LabelAirsBeforeEpisode": "Airs before episode:", "LabelAirsBeforeEpisode": "Airs before episode:",
"LabelAirsBeforeSeason": "Airs before season:", "LabelAirsBeforeSeason": "Airs before season:",
"LabelAlbum": "Album:", "LabelAlbum": "Album:",
"LabelAlbumArtMaxResHelp": "Maximum resolution of album art exposed via the upnp:albumArtURI property.",
"LabelAlbumArtHelp": "PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Some devices require a specific value, regardless of the size of the image.", "LabelAlbumArtHelp": "PN used for album art, within the dlna:profileID attribute on upnp:albumArtURI. Some devices require a specific value, regardless of the size of the image.",
"LabelAlbumArtMaxHeight": "Album art max height:", "LabelAlbumArtMaxHeight": "Album art max height:",
"LabelAlbumArtMaxHeightHelp": "Max resolution of album art exposed via upnp:albumArtURI.", "LabelAlbumArtMaxHeightHelp": "Max resolution of album art exposed via upnp:albumArtURI.",
@ -593,6 +595,7 @@
"LabelHomeScreenSectionValue": "Home screen section {0}:", "LabelHomeScreenSectionValue": "Home screen section {0}:",
"LabelHttpsPort": "Local HTTPS port number:", "LabelHttpsPort": "Local HTTPS port number:",
"LabelHttpsPortHelp": "The TCP port number for the HTTPS server.", "LabelHttpsPortHelp": "The TCP port number for the HTTPS server.",
"LabelIconMaxResHelp": "Maximum resolution of icons exposed via the upnp:icon property.",
"LabelIconMaxHeight": "Icon maximum height:", "LabelIconMaxHeight": "Icon maximum height:",
"LabelIconMaxHeightHelp": "Maximum resolution of icons exposed via upnp:icon.", "LabelIconMaxHeightHelp": "Maximum resolution of icons exposed via upnp:icon.",
"LabelIconMaxWidth": "Icon maximum width:", "LabelIconMaxWidth": "Icon maximum width:",
@ -1115,6 +1118,7 @@
"PerfectMatch": "Perfect match", "PerfectMatch": "Perfect match",
"Person": "Person", "Person": "Person",
"Photos": "Photos", "Photos": "Photos",
"Photo": "Photo",
"PictureInPicture": "Picture in picture", "PictureInPicture": "Picture in picture",
"PinCodeResetComplete": "The pin code has been reset.", "PinCodeResetComplete": "The pin code has been reset.",
"PinCodeResetConfirmation": "Are you sure you wish to reset the pin code?", "PinCodeResetConfirmation": "Are you sure you wish to reset the pin code?",
@ -1337,6 +1341,7 @@
"ValueVideoCodec": "Video Codec: {0}", "ValueVideoCodec": "Video Codec: {0}",
"Vertical": "Vertical", "Vertical": "Vertical",
"Video": "Video", "Video": "Video",
"VideoAudio": "Video Audio",
"ViewAlbum": "View album", "ViewAlbum": "View album",
"ViewAlbumArtist": "View album artist", "ViewAlbumArtist": "View album artist",
"ViewPlaybackInfo": "View playback info", "ViewPlaybackInfo": "View playback info",