Added more text content to the I18N system (#446)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-05-04 14:59:30 +02:00
1 parent cfc2103b43
commit 7a08baf99b
43 files changed
+3356 -354

No files matched your search

@@ -1,16 +1,19 @@
using AIStudio.Tools.ERIClient.DataModel;
using AIStudio.Tools.PluginSystem;
namespace AIStudio.Tools;
public static class AuthMethodsV1Extensions
{
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AuthMethodsV1Extensions).Namespace, nameof(AuthMethodsV1Extensions));
public static string DisplayName(this AuthMethod authMethod) => authMethod switch
{
AuthMethod.NONE => "None",
AuthMethod.USERNAME_PASSWORD => "Username & Password",
AuthMethod.KERBEROS => "SSO (Kerberos)",
AuthMethod.TOKEN => "Access Token",
AuthMethod.NONE => TB("None"),
AuthMethod.USERNAME_PASSWORD => TB("Username & Password"),
AuthMethod.KERBEROS => TB("SSO (Kerberos)"),
AuthMethod.TOKEN => TB("Access Token"),
_ => "Unknown authentication method",
_ => TB("Unknown authentication method"),
};
}