Add GPL modules

This commit is contained in:
Andrew Rabert
2018-12-27 18:27:57 -05:00
parent 9bac3ac616
commit a86b71899e
648 changed files with 50005 additions and 123 deletions

View File

@@ -0,0 +1,33 @@

namespace MediaBrowser.Model.Globalization
{
/// <summary>
/// Class CountryInfo
/// </summary>
public class CountryInfo
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the display name.
/// </summary>
/// <value>The display name.</value>
public string DisplayName { get; set; }
/// <summary>
/// Gets or sets the name of the two letter ISO region.
/// </summary>
/// <value>The name of the two letter ISO region.</value>
public string TwoLetterISORegionName { get; set; }
/// <summary>
/// Gets or sets the name of the three letter ISO region.
/// </summary>
/// <value>The name of the three letter ISO region.</value>
public string ThreeLetterISORegionName { get; set; }
}
}

View File

@@ -0,0 +1,52 @@
using global::System;
namespace MediaBrowser.Model.Globalization
{
/// <summary>
/// Class CultureDto
/// </summary>
public class CultureDto
{
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the display name.
/// </summary>
/// <value>The display name.</value>
public string DisplayName { get; set; }
/// <summary>
/// Gets or sets the name of the two letter ISO language.
/// </summary>
/// <value>The name of the two letter ISO language.</value>
public string TwoLetterISOLanguageName { get; set; }
/// <summary>
/// Gets or sets the name of the three letter ISO language.
/// </summary>
/// <value>The name of the three letter ISO language.</value>
public string ThreeLetterISOLanguageName
{
get
{
var vals = ThreeLetterISOLanguageNames;
if (vals.Length > 0)
{
return vals[0];
}
return null;
}
}
public string[] ThreeLetterISOLanguageNames { get; set; }
public CultureDto()
{
ThreeLetterISOLanguageNames = new string[] {};
}
}
}

View File

@@ -0,0 +1,63 @@
using System.Collections.Generic;
using MediaBrowser.Model.Entities;
using System.Globalization;
namespace MediaBrowser.Model.Globalization
{
/// <summary>
/// Interface ILocalizationManager
/// </summary>
public interface ILocalizationManager
{
/// <summary>
/// Gets the cultures.
/// </summary>
/// <returns>IEnumerable{CultureDto}.</returns>
CultureDto[] GetCultures();
/// <summary>
/// Gets the countries.
/// </summary>
/// <returns>IEnumerable{CountryInfo}.</returns>
CountryInfo[] GetCountries();
/// <summary>
/// Gets the parental ratings.
/// </summary>
/// <returns>IEnumerable{ParentalRating}.</returns>
ParentalRating[] GetParentalRatings();
/// <summary>
/// Gets the rating level.
/// </summary>
/// <param name="rating">The rating.</param>
/// <returns>System.Int32.</returns>
int? GetRatingLevel(string rating);
/// <summary>
/// Gets the localized string.
/// </summary>
/// <param name="phrase">The phrase.</param>
/// <param name="culture">The culture.</param>
/// <returns>System.String.</returns>
string GetLocalizedString(string phrase, string culture);
/// <summary>
/// Gets the localized string.
/// </summary>
/// <param name="phrase">The phrase.</param>
/// <returns>System.String.</returns>
string GetLocalizedString(string phrase);
/// <summary>
/// Gets the localization options.
/// </summary>
/// <returns>IEnumerable{LocalizatonOption}.</returns>
LocalizatonOption[] GetLocalizationOptions();
string RemoveDiacritics(string text);
string NormalizeFormKD(string text);
bool HasUnicodeCategory(string value, UnicodeCategory category);
CultureDto FindLanguageInfo(string language);
}
}

View File

@@ -0,0 +1,8 @@
namespace MediaBrowser.Model.Globalization
{
public class LocalizatonOption
{
public string Name { get; set; }
public string Value { get; set; }
}
}