From a8663e46b9813b4bed07f9557e78e0be88e7325a Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 12 Apr 2025 17:46:05 +0200 Subject: [PATCH] Added a no language plugin class --- .../Tools/PluginSystem/NoPluginLanguage.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app/MindWork AI Studio/Tools/PluginSystem/NoPluginLanguage.cs diff --git a/app/MindWork AI Studio/Tools/PluginSystem/NoPluginLanguage.cs b/app/MindWork AI Studio/Tools/PluginSystem/NoPluginLanguage.cs new file mode 100644 index 00000000..67fd644a --- /dev/null +++ b/app/MindWork AI Studio/Tools/PluginSystem/NoPluginLanguage.cs @@ -0,0 +1,28 @@ +using Lua; + +namespace AIStudio.Tools.PluginSystem; + +public sealed class NoPluginLanguage : PluginBase, ILanguagePlugin +{ + public static readonly NoPluginLanguage INSTANCE = new(); + + private NoPluginLanguage() : base(true, LuaState.Create(), PluginType.LANGUAGE, string.Empty) + { + } + + #region Implementation of ILanguagePlugin + + public bool TryGetText(string key, out string value) + { + value = string.Empty; + return true; + } + + public string this[string key] => string.Empty; + + public string IETFTag => string.Empty; + + public string LangName => string.Empty; + + #endregion +} \ No newline at end of file