Removed indexer from language plugin classes

This commit is contained in:
Thorsten Sommer 2025-04-12 21:11:45 +02:00
parent 2ba4789b31
commit 7a56ec6705
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 0 additions and 14 deletions

View File

@ -20,15 +20,6 @@ public interface ILanguagePlugin
/// <returns>True if the key exists, false otherwise.</returns> /// <returns>True if the key exists, false otherwise.</returns>
public bool TryGetText(string key, out string value, bool logWarning = false); public bool TryGetText(string key, out string value, bool logWarning = false);
/// <summary>
/// Gets the text from the language plugin.
/// </summary>
/// <remarks>
/// When the key does not exist, the value will be an empty string.
/// </remarks>
/// <param name="key">The key to use to get the text.</param>
public string this[string key] { get; }
/// <summary> /// <summary>
/// Gets the IETF tag of the language plugin. /// Gets the IETF tag of the language plugin.
/// </summary> /// </summary>

View File

@ -18,8 +18,6 @@ public sealed class NoPluginLanguage : PluginBase, ILanguagePlugin
return true; return true;
} }
public string this[string key] => string.Empty;
public string IETFTag => string.Empty; public string IETFTag => string.Empty;
public string LangName => string.Empty; public string LangName => string.Empty;

View File

@ -159,9 +159,6 @@ public sealed class PluginLanguage : PluginBase, ILanguagePlugin
value = string.Empty; value = string.Empty;
return false; return false;
} }
/// <inheritdoc />
public string this[string key] => this.TryGetText(key, out var value) ? value : "string.Empty";
/// <inheritdoc /> /// <inheritdoc />
public string IETFTag => this.langCultureTag; public string IETFTag => this.langCultureTag;