mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
fix(translations): 🌐 Localization - Ensuring all of the app including backend are localized #4366
* Localize TV and movies titles in requests * Add missing release statuses * Localize collection request * Localize TV shows in newsletter Uses TMDB instead of TVMaze for title, genres and synopsis * Localize error messages * Localize albums requests * Use current language for TV and movies requests * Remove unecessary console log
This commit is contained in:
parent
d8d1091564
commit
5e140ab618
28 changed files with 205 additions and 137 deletions
|
@ -6,6 +6,7 @@ using System.Security.Principal;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Ombi.Core.Authentication;
|
||||
using Ombi.Core.Engine;
|
||||
using Ombi.Core.Rule.Interfaces;
|
||||
using Ombi.Helpers;
|
||||
using Ombi.Store.Entities.Requests;
|
||||
|
@ -34,7 +35,7 @@ namespace Ombi.Core.Rule.Rules.Request
|
|||
{
|
||||
if (await _manager.IsInRoleAsync(user, OmbiRoles.RequestMovie) || await _manager.IsInRoleAsync(user, OmbiRoles.AutoApproveMovie))
|
||||
return Success();
|
||||
return Fail("You do not have permissions to Request a Movie");
|
||||
return Fail(ErrorCode.NoPermissionsRequestMovie, "You do not have permissions to Request a Movie");
|
||||
}
|
||||
|
||||
if (obj.RequestType == RequestType.TvShow)
|
||||
|
@ -44,7 +45,7 @@ namespace Ombi.Core.Rule.Rules.Request
|
|||
return Success();
|
||||
}
|
||||
|
||||
return Fail("You do not have permissions to Request a TV Show");
|
||||
return Fail(ErrorCode.NoPermissionsRequestTV, "You do not have permissions to Request a TV Show");
|
||||
}
|
||||
|
||||
if (obj.RequestType == RequestType.Album)
|
||||
|
@ -54,7 +55,7 @@ namespace Ombi.Core.Rule.Rules.Request
|
|||
return Success();
|
||||
}
|
||||
|
||||
return Fail("You do not have permissions to Request an Album");
|
||||
return Fail(ErrorCode.NoPermissionsRequestAlbum, "You do not have permissions to Request an Album");
|
||||
}
|
||||
|
||||
throw new InvalidDataException("Permission check failed: unknown RequestType");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue