The Free Software Media System - Server Backend & API
update translations
Luke Pulverenti66ad10348fe9
diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.csindex 5e200428a7..c6c213a48b 100644--- a/Emby.Dlna/Didl/DidlBuilder.cs+++ b/Emby.Dlna/Didl/DidlBuilder.cs@@ -393,75 +393,75 @@ namespace Emby.Dlna.Didl{if (itemStubType.HasValue && itemStubType.Value == StubType.Latest){- return _localization.GetLocalizedString("ViewTypeMusicLatest");+ return _localization.GetLocalizedString("Latest");}if (itemStubType.HasValue && itemStubType.Value == StubType.Playlists){- return _localization.GetLocalizedString("ViewTypeMusicPlaylists");+ return _localization.GetLocalizedString("Playlists");}if (itemStubType.HasValue && itemStubType.Value == StubType.AlbumArtists){- return _localization.GetLocalizedString("ViewTypeMusicAlbumArtists");+ return _localization.GetLocalizedString("HeaderAlbumArtists");}if (itemStubType.HasValue && itemStubType.Value == StubType.Albums){- return _localization.GetLocalizedString("ViewTypeMusicAlbums");+ return _localization.GetLocalizedString("Albums");}if (itemStubType.HasValue && itemStubType.Value == StubType.Artists){- return _localization.GetLocalizedString("ViewTypeMusicArtists");+ return _localization.GetLocalizedString("Artists");}if (itemStubType.HasValue && itemStubType.Value == StubType.Songs){- return _localization.GetLocalizedString("ViewTypeMusicSongs");+ return _localization.GetLocalizedString("Songs");}if (itemStubType.HasValue && itemStubType.Value == StubType.Genres){- return _localization.GetLocalizedString("ViewTypeTvGenres");+ return _localization.GetLocalizedString("Genres");}if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteAlbums){- return _localization.GetLocalizedString("ViewTypeMusicFavoriteAlbums");+ return _localization.GetLocalizedString("HeaderFavoriteAlbums");}if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteArtists){- return _localization.GetLocalizedString("ViewTypeMusicFavoriteArtists");+ return _localization.GetLocalizedString("HeaderFavoriteArtists");}if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSongs){- return _localization.GetLocalizedString("ViewTypeMusicFavoriteSongs");+ return _localization.GetLocalizedString("HeaderFavoriteSongs");}if (itemStubType.HasValue && itemStubType.Value == StubType.ContinueWatching){- return _localization.GetLocalizedString("ViewTypeMovieResume");+ return _localization.GetLocalizedString("HeaderContinueWatching");}if (itemStubType.HasValue && itemStubType.Value == StubType.Movies){- return _localization.GetLocalizedString("ViewTypeMovieMovies");+ return _localization.GetLocalizedString("Movies");}if (itemStubType.HasValue && itemStubType.Value == StubType.Collections){- return _localization.GetLocalizedString("ViewTypeMovieCollections");+ return _localization.GetLocalizedString("Collections");}if (itemStubType.HasValue && itemStubType.Value == StubType.Favorites){- return _localization.GetLocalizedString("ViewTypeMovieFavorites");+ return _localization.GetLocalizedString("Favorites");}if (itemStubType.HasValue && itemStubType.Value == StubType.NextUp){- return _localization.GetLocalizedString("ViewTypeTvNextUp");+ return _localization.GetLocalizedString("HeaderNextUp");}if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteSeries){- return _localization.GetLocalizedString("ViewTypeTvFavoriteSeries");+ return _localization.GetLocalizedString("HeaderFavoriteShows");}if (itemStubType.HasValue && itemStubType.Value == StubType.FavoriteEpisodes){- return _localization.GetLocalizedString("ViewTypeTvFavoriteEpisodes");+ return _localization.GetLocalizedString("HeaderFavoriteEpisodes");}if (itemStubType.HasValue && itemStubType.Value == StubType.Series){- return _localization.GetLocalizedString("ViewTypeTvShowSeries");+ return _localization.GetLocalizedString("Shows");}var episode = item as Episode;diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.csindex 0036d19708..c42f22804b 100644--- a/Emby.Server.Implementations/Channels/ChannelManager.cs+++ b/Emby.Server.Implementations/Channels/ChannelManager.cs@@ -1547,7 +1547,7 @@ namespace Emby.Server.Implementations.Channelspublic Folder GetInternalChannelFolder(CancellationToken cancellationToken){- var name = _localization.GetLocalizedString("ViewTypeChannels");+ var name = _localization.GetLocalizedString("Channels");return _libraryManager.GetNamedView(name, "channels", "zz_" + name, cancellationToken);}diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.csindex 4ee0f553f3..ddab3caa56 100644--- a/Emby.Server.Implementations/Library/UserViewManager.cs+++ b/Emby.Server.Implementations/Library/UserViewManager.cs@@ -95,13 +95,15 @@ namespace Emby.Server.Implementations.Libraryif (parents.Count > 0){- list.Add(GetUserView(parents, viewType, string.Empty, user, query.PresetViews, cancellationToken));+ var localizationKey = viewType.Replace("Tv", string.Empty);++ list.Add(GetUserView(parents, viewType, localizationKey, string.Empty, user, query.PresetViews, cancellationToken));}}if (_config.Configuration.EnableFolderView){- var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Folders);+ var name = _localizationManager.GetLocalizedString("Folders");list.Add(_libraryManager.GetNamedView(name, CollectionType.Folders, string.Empty, cancellationToken));}@@ -158,21 +160,21 @@ namespace Emby.Server.Implementations.Library.ToArray();}- public UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken)+ public UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName, CancellationToken cancellationToken){var uniqueId = parentId + "subview" + type;return _libraryManager.GetNamedView(name, parentId, type, sortName, uniqueId, cancellationToken);}- public UserView GetUserSubView(string parentId, string type, string sortName, CancellationToken cancellationToken)+ public UserView GetUserSubView(string parentId, string type, string localizationKey, string sortName, CancellationToken cancellationToken){- var name = _localizationManager.GetLocalizedString("ViewType" + type);+ var name = _localizationManager.GetLocalizedString(localizationKey);- return GetUserSubView(name, parentId, type, sortName, cancellationToken);+ return GetUserSubViewWithName(name, parentId, type, sortName, cancellationToken);}- private Folder GetUserView(List<ICollectionFolder> parents, string viewType, string sortName, User user, string[] presetViews, CancellationToken cancellationToken)+ private Folder GetUserView(List<ICollectionFolder> parents, string viewType, string localizationKey, string sortName, User user, string[] presetViews, CancellationToken cancellationToken){if (parents.Count == 1 && parents.All(i => string.Equals(i.CollectionType, viewType, StringComparison.OrdinalIgnoreCase))){@@ -184,7 +186,7 @@ namespace Emby.Server.Implementations.Libraryreturn GetUserView((Folder)parents[0], viewType, string.Empty, cancellationToken);}- var name = _localizationManager.GetLocalizedString("ViewType" + viewType);+ var name = _localizationManager.GetLocalizedString(localizationKey);return _libraryManager.GetNamedView(user, name, viewType, sortName, cancellationToken);}diff --git a/MediaBrowser.Controller/Entities/UserViewBuilder.cs b/MediaBrowser.Controller/Entities/UserViewBuilder.csindex acc452fbc3..97b96127a2 100644--- a/MediaBrowser.Controller/Entities/UserViewBuilder.cs+++ b/MediaBrowser.Controller/Entities/UserViewBuilder.cs@@ -262,14 +262,14 @@ namespace MediaBrowser.Controller.Entitiesvar list = new List<BaseItem>();- list.Add(GetUserView(SpecialFolder.MusicLatest, "0", parent));- list.Add(GetUserView(SpecialFolder.MusicPlaylists, "1", parent));- list.Add(GetUserView(SpecialFolder.MusicAlbums, "2", parent));- list.Add(GetUserView(SpecialFolder.MusicAlbumArtists, "3", parent));- list.Add(GetUserView(SpecialFolder.MusicArtists, "4", parent));- list.Add(GetUserView(SpecialFolder.MusicSongs, "5", parent));- list.Add(GetUserView(SpecialFolder.MusicGenres, "6", parent));- list.Add(GetUserView(SpecialFolder.MusicFavorites, "7", parent));+ list.Add(GetUserView(SpecialFolder.MusicLatest, "Latest", "0", parent));+ list.Add(GetUserView(SpecialFolder.MusicPlaylists, "Playlists", "1", parent));+ list.Add(GetUserView(SpecialFolder.MusicAlbums, "Albums", "2", parent));+ list.Add(GetUserView(SpecialFolder.MusicAlbumArtists, "HeaderAlbumArtists", "3", parent));+ list.Add(GetUserView(SpecialFolder.MusicArtists, "Artists", "4", parent));+ list.Add(GetUserView(SpecialFolder.MusicSongs, "Songs", "5", parent));+ list.Add(GetUserView(SpecialFolder.MusicGenres, "Genres", "6", parent));+ list.Add(GetUserView(SpecialFolder.MusicFavorites, "Favorites", "7", parent));return GetResult(list, parent, query);}@@ -278,9 +278,9 @@ namespace MediaBrowser.Controller.Entities{var list = new List<BaseItem>();- list.Add(GetUserView(SpecialFolder.MusicFavoriteAlbums, "0", parent));- list.Add(GetUserView(SpecialFolder.MusicFavoriteArtists, "1", parent));- list.Add(GetUserView(SpecialFolder.MusicFavoriteSongs, "2", parent));+ list.Add(GetUserView(SpecialFolder.MusicFavoriteAlbums, "HeaderFavoriteAlbums", "0", parent));+ list.Add(GetUserView(SpecialFolder.MusicFavoriteArtists, "HeaderFavoriteArtists", "1", parent));+ list.Add(GetUserView(SpecialFolder.MusicFavoriteSongs, "HeaderFavoriteSongs", "2", parent));return GetResult(list, parent, query);}@@ -443,12 +443,12 @@ namespace MediaBrowser.Controller.Entitiesvar list = new List<BaseItem>();- list.Add(GetUserView(SpecialFolder.MovieResume, "0", parent));- list.Add(GetUserView(SpecialFolder.MovieLatest, "1", parent));- list.Add(GetUserView(SpecialFolder.MovieMovies, "2", parent));- list.Add(GetUserView(SpecialFolder.MovieCollections, "3", parent));- list.Add(GetUserView(SpecialFolder.MovieFavorites, "4", parent));- list.Add(GetUserView(SpecialFolder.MovieGenres, "5", parent));+ list.Add(GetUserView(SpecialFolder.MovieResume, "HeaderContinueWatching", "0", parent));+ list.Add(GetUserView(SpecialFolder.MovieLatest, "Latest", "1", parent));+ list.Add(GetUserView(SpecialFolder.MovieMovies, "Movies", "2", parent));+ list.Add(GetUserView(SpecialFolder.MovieCollections, "Collections", "3", parent));+ list.Add(GetUserView(SpecialFolder.MovieFavorites, "Favorites", "4", parent));+ list.Add(GetUserView(SpecialFolder.MovieGenres, "Genres", "5", parent));return GetResult(list, parent, query);}@@ -564,7 +564,7 @@ namespace MediaBrowser.Controller.Entities}).Where(i => i != null)- .Select(i => GetUserView(i.Name, SpecialFolder.MovieGenre, i.SortName, parent));+ .Select(i => GetUserViewWithName(i.Name, SpecialFolder.MovieGenre, i.SortName, parent));return GetResult(genres, parent, query);}@@ -613,13 +613,13 @@ namespace MediaBrowser.Controller.Entitiesvar list = new List<BaseItem>();- list.Add(GetUserView(SpecialFolder.TvResume, "0", parent));- list.Add(GetUserView(SpecialFolder.TvNextUp, "1", parent));- list.Add(GetUserView(SpecialFolder.TvLatest, "2", parent));- list.Add(GetUserView(SpecialFolder.TvShowSeries, "3", parent));- list.Add(GetUserView(SpecialFolder.TvFavoriteSeries, "4", parent));- list.Add(GetUserView(SpecialFolder.TvFavoriteEpisodes, "5", parent));- list.Add(GetUserView(SpecialFolder.TvGenres, "6", parent));+ list.Add(GetUserView(SpecialFolder.TvResume, "HeaderContinueWatching", "0", parent));+ list.Add(GetUserView(SpecialFolder.TvNextUp, "HeaderNextUp", "1", parent));+ list.Add(GetUserView(SpecialFolder.TvLatest, "Latest", "2", parent));+ list.Add(GetUserView(SpecialFolder.TvShowSeries, "Shows", "3", parent));+ list.Add(GetUserView(SpecialFolder.TvFavoriteSeries, "HeaderFavoriteShows", "4", parent));+ list.Add(GetUserView(SpecialFolder.TvFavoriteEpisodes, "HeaderFavoriteEpisodes", "5", parent));+ list.Add(GetUserView(SpecialFolder.TvGenres, "Genres", "6", parent));return GetResult(list, parent, query);}@@ -703,7 +703,7 @@ namespace MediaBrowser.Controller.Entities}).Where(i => i != null)- .Select(i => GetUserView(i.Name, SpecialFolder.TvGenre, i.SortName, parent));+ .Select(i => GetUserViewWithName(i.Name, SpecialFolder.TvGenre, i.SortName, parent));return GetResult(genres, parent, query);}@@ -1736,20 +1736,20 @@ namespace MediaBrowser.Controller.Entitiesvar list = new List<BaseItem>();//list.Add(await GetUserSubView(SpecialFolder.LiveTvNowPlaying, user, "0", parent).ConfigureAwait(false));- list.Add(GetUserView(SpecialFolder.LiveTvChannels, string.Empty, user.RootFolder));- list.Add(GetUserView(SpecialFolder.LiveTvRecordingGroups, string.Empty, user.RootFolder));+ list.Add(GetUserView(SpecialFolder.LiveTvChannels, "Channels", string.Empty, user.RootFolder));+ list.Add(GetUserView(SpecialFolder.LiveTvRecordingGroups, "HeaderRecordingGroups", string.Empty, user.RootFolder));return GetResult(list, queryParent, query);}- private UserView GetUserView(string name, string type, string sortName, BaseItem parent)+ private UserView GetUserViewWithName(string name, string type, string sortName, BaseItem parent){return _userViewManager.GetUserSubView(name, parent.Id.ToString("N"), type, sortName, CancellationToken.None);}- private UserView GetUserView(string type, string sortName, BaseItem parent)+ private UserView GetUserView(string type, string localizationKey, string sortName, BaseItem parent){- return _userViewManager.GetUserSubView(parent.Id.ToString("N"), type, sortName, CancellationToken.None);+ return _userViewManager.GetUserSubView(parent.Id.ToString("N"), type, localizationKey, sortName, CancellationToken.None);}public static IEnumerable<BaseItem> FilterForAdjacency(List<BaseItem> list, string adjacentToId)diff --git a/MediaBrowser.Controller/Library/IUserViewManager.cs b/MediaBrowser.Controller/Library/IUserViewManager.csindex ac37dc869c..baecdd748f 100644--- a/MediaBrowser.Controller/Library/IUserViewManager.cs+++ b/MediaBrowser.Controller/Library/IUserViewManager.cs@@ -13,9 +13,9 @@ namespace MediaBrowser.Controller.Library{Task<Folder[]> GetUserViews(UserViewQuery query, CancellationToken cancellationToken);- UserView GetUserSubView(string name, string parentId, string type, string sortName, CancellationToken cancellationToken);+ UserView GetUserSubViewWithName(string name, string parentId, string type, string sortName, CancellationToken cancellationToken);- UserView GetUserSubView(string category, string type, string sortName, CancellationToken cancellationToken);+ UserView GetUserSubView(string category, string type, string localizationKey, string sortName, CancellationToken cancellationToken);List<Tuple<BaseItem, List<BaseItem>>> GetLatestItems(LatestItemsQuery request, DtoOptions options);}diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.csindex 64a485bc20..a6a363ffdf 100644--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs@@ -248,7 +248,7 @@ namespace MediaBrowser.Providers.MediaInfoif (string.IsNullOrWhiteSpace(chapter.Name) ||TimeSpan.TryParse(chapter.Name, out time)){- chapter.Name = string.Format(_localization.GetLocalizedString("LabelChapterName"), index.ToString(CultureInfo.InvariantCulture));+ chapter.Name = string.Format(_localization.GetLocalizedString("ChapterNameValue"), index.ToString(CultureInfo.InvariantCulture));}index++;}