fix(localisation): Localize request types in notifications (#4516)

[skip ci]
pull/4524/head
sephrat 2 years ago committed by GitHub
parent 2ed8c48d12
commit e09435da45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,6 +60,15 @@ namespace Ombi.I18n.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Album.
/// </summary>
public static string Album {
get {
return ResourceManager.GetString("Album", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Type:.
/// </summary>
@ -87,6 +96,15 @@ namespace Ombi.I18n.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Movie.
/// </summary>
public static string Movie {
get {
return ResourceManager.GetString("Movie", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to New Albums.
/// </summary>
@ -132,6 +150,15 @@ namespace Ombi.I18n.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to TV Show.
/// </summary>
public static string TvShow {
get {
return ResourceManager.GetString("TvShow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unsubscribe.
/// </summary>

@ -144,4 +144,13 @@
<data name="Unsubscribe" xml:space="preserve">
<value>Unsubscribe</value>
</data>
<data name="Album" xml:space="preserve">
<value>Album</value>
</data>
<data name="Movie" xml:space="preserve">
<value>Movie</value>
</data>
<data name="TvShow" xml:space="preserve">
<value>TV Show</value>
</data>
</root>

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using Humanizer;
using Ombi.Helpers;
using Ombi.I18n.Resources;
using Ombi.Notifications.Models;
using Ombi.Settings.Settings.Models;
using Ombi.Store.Entities;
@ -192,7 +193,9 @@ namespace Ombi.Notifications
return requestType switch
{
null => string.Empty,
RequestType.TvShow => "TV Show",
RequestType.TvShow => Texts.TvShow,
RequestType.Album => Texts.Album,
RequestType.Movie => Texts.Movie,
_ => requestType.Humanize()
};
}

Loading…
Cancel
Save