mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 11:59:48 +00:00
Removed indexer from language plugin classes
This commit is contained in:
parent
2ba4789b31
commit
7a56ec6705
@ -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>
|
||||||
|
@ -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;
|
||||||
|
@ -160,9 +160,6 @@ public sealed class PluginLanguage : PluginBase, ILanguagePlugin
|
|||||||
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user