Add localization to lang behavior options

This commit is contained in:
Thorsten Sommer 2025-05-03 21:46:50 +02:00
parent 4e67ea482a
commit 8832c2fc75
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 16 additions and 12 deletions

View File

@ -0,0 +1,16 @@
using AIStudio.Tools.PluginSystem;
namespace AIStudio.Settings.DataModel;
public static class LangBehaviorExtensions
{
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(LangBehaviorExtensions).Namespace, nameof(LangBehaviorExtensions));
public static string Name(this LangBehavior langBehavior) => langBehavior switch
{
LangBehavior.AUTO => TB("Choose the language automatically, based on your system language."),
LangBehavior.MANUAL => TB("Choose the language manually."),
_ => TB("Unknown option")
};
}

View File

@ -1,12 +0,0 @@
namespace AIStudio.Settings.DataModel;
public static class LangBehaviorExtensions
{
public static string Name(this LangBehavior langBehavior) => langBehavior switch
{
LangBehavior.AUTO => "Choose the language automatically, based on your system language.",
LangBehavior.MANUAL => "Choose the language manually.",
_ => "Unknown option"
};
}