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

View file

@ -33,11 +33,11 @@
</label>
<label>
<input is="emby-checkbox" type="checkbox" id="chkPhoto" data-value="Photo" class="chkMediaType" />
<span>${OptionProfilePhoto}</span>
<span>${Photo}</span>
</label>
<label>
<input is="emby-checkbox" type="checkbox" id="chkVideo" data-value="Video" class="chkMediaType" />
<span>${OptionProfileVideo}</span>
<span>${Video}</span>
</label>
</div>
</div>
@ -144,19 +144,19 @@
</div>
<div class="inputContainer">
<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 class="inputContainer">
<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 class="inputContainer">
<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 class="inputContainer">
<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>
@ -280,8 +280,8 @@
<div class="selectContainer">
<select id="selectDirectPlayProfileType" name="selectDirectPlayProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option>
<option value="Video">${OptionProfileVideo}</option>
<option value="Photo">${Photo}</option>
<option value="Video">${Video}</option>
</select>
</div>
<div class="inputContainer">
@ -328,8 +328,8 @@
<div class="selectContainer">
<select id="selectTranscodingProfileType" name="selectTranscodingProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option>
<option value="Video">${OptionProfileVideo}</option>
<option value="Photo">${Photo}</option>
<option value="Video">${Video}</option>
</select>
</div>
<div id="fldTranscodingProtocol" style="margin: 1em 0;">
@ -404,8 +404,8 @@
<div class="selectContainer">
<select id="selectContainerProfileType" name="selectContainerProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option>
<option value="Video">${OptionProfileVideo}</option>
<option value="Photo">${Photo}</option>
<option value="Video">${Video}</option>
</select>
</div>
<div class="inputContainer">
@ -434,8 +434,8 @@
<p>${HeaderCodecProfileHelp}</p>
<div class="selectContainer">
<select id="selectCodecProfileType" name="selectCodecProfileType" is="emby-select" label="${LabelType}">
<option value="Video">${OptionProfileVideo}</option>
<option value="VideoAudio">${OptionProfileVideoAudio}</option>
<option value="Video">${Video}</option>
<option value="VideoAudio">${VideoAudio}</option>
<option value="Audio">${Audio}</option>
</select>
</div>
@ -463,8 +463,8 @@
<div class="selectContainer">
<select id="selectResponseProfileType" name="selectResponseProfileType" is="emby-select" label="${LabelType}">
<option value="Audio">${Audio}</option>
<option value="Photo">${OptionProfilePhoto}</option>
<option value="Video">${OptionProfileVideo}</option>
<option value="Photo">${Photo}</option>
<option value="Video">${Video}</option>
</select>
</div>
<div class="inputContainer">

View file

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

View file

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