Browse Source

remove unnecassary fields from ResxLocalizationManager

pull/2395/head
Cenngo 2 years ago
parent
commit
ee767c2ab3
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      src/Discord.Net.Interactions/LocalizationManagers/ResxLocalizationManager.cs

+ 2
- 6
src/Discord.Net.Interactions/LocalizationManagers/ResxLocalizationManager.cs View File

@@ -14,8 +14,6 @@ namespace Discord.Interactions
private const string DescriptionIdentifier = "description";
private const string SpaceToken = "~";

private readonly string _baseResource;
private readonly Assembly _assembly;
private readonly ResourceManager _resourceManager;
private readonly IEnumerable<CultureInfo> _supportedLocales;

@@ -27,10 +25,8 @@ namespace Discord.Interactions
/// <param name="supportedLocales">Cultures the <see cref="ResxLocalizationManager"/> should search for.</param>
public ResxLocalizationManager(string baseResource, Assembly assembly, params CultureInfo[] supportedLocales)
{
_baseResource = baseResource;
_assembly = assembly;
_supportedLocales = supportedLocales;
_resourceManager = new ResourceManager(_baseResource, assembly);
_resourceManager = new ResourceManager(baseResource, assembly);
}

/// <inheritdoc />
@@ -43,7 +39,7 @@ namespace Discord.Interactions

private IDictionary<string, string> GetValues(IList<string> key, string identifier)
{
var entryKey = (string.Join('.', key) + '.' + identifier).Replace(" ", SpaceToken);
var entryKey = (string.Join(".", key) + "." + identifier).Replace(" ", SpaceToken);

var result = new Dictionary<string, string>();



Loading…
Cancel
Save