mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-14 04:47:22 +00:00
Added the choice between formal and informal address to the whole app (#1200)
This commit is contained in:
1 parent
382db4b8d0
commit
c9a376f742
342 files changed
+14378
-1893
No files matched your search
@@ -6,6 +6,8 @@ public static class MailboxConnectionFailureExtensions
|
||||
{
|
||||
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(MailboxConnectionFailureExtensions).Namespace, nameof(MailboxConnectionFailureExtensions));
|
||||
|
||||
private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(MailboxConnectionFailureExtensions).Namespace, nameof(MailboxConnectionFailureExtensions));
|
||||
|
||||
extension(MailboxConnectionFailure failure)
|
||||
{
|
||||
/// <summary>
|
||||
@@ -13,12 +15,12 @@ public static class MailboxConnectionFailureExtensions
|
||||
/// </summary>
|
||||
public string Description => failure switch
|
||||
{
|
||||
MailboxConnectionFailure.AUTHENTICATION_FAILED => TB("The server rejected the username or the password. Some providers require an app password instead of your usual password."),
|
||||
MailboxConnectionFailure.NETWORK_UNAVAILABLE => TB("The server could not be reached. Please check the host and the port, and whether you need a VPN connection."),
|
||||
MailboxConnectionFailure.TLS_FAILED => TB("No encrypted connection to the server could be established. When your organization uses a certificate authority of its own, enable the additional root certificates in the app settings, select the bundle with its root certificate, and add the host of the server to the allowed hosts. Your IT department can also configure this for you."),
|
||||
MailboxConnectionFailure.SERVER_ERROR => TB("The server reported an error. Please try again later."),
|
||||
MailboxConnectionFailure.AUTHENTICATION_FAILED => TA("The server rejected the username or the password. Some providers require an app password instead of your usual password."),
|
||||
MailboxConnectionFailure.NETWORK_UNAVAILABLE => TA("The server could not be reached. Please check the host and the port, and whether you need a VPN connection."),
|
||||
MailboxConnectionFailure.TLS_FAILED => TA("No encrypted connection to the server could be established. When your organization uses a certificate authority of its own, enable the additional root certificates in the app settings, select the bundle with its root certificate, and add the host of the server to the allowed hosts. Your IT department can also configure this for you."),
|
||||
MailboxConnectionFailure.SERVER_ERROR => TA("The server reported an error. Please try again later."),
|
||||
MailboxConnectionFailure.INVALID_SETTINGS => TB("The settings of this mailbox are incomplete, or they were made by a newer version of AI Studio."),
|
||||
MailboxConnectionFailure.SERVER_NOT_ALLOWED => TB("Your organization allows mailboxes only on its own mail servers, and this server is none of them. AI Studio does not connect to it, and the AI does not read this mailbox."),
|
||||
MailboxConnectionFailure.SERVER_NOT_ALLOWED => TA("Your organization allows mailboxes only on its own mail servers, and this server is none of them. AI Studio does not connect to it, and the AI does not read this mailbox."),
|
||||
|
||||
_ => TB("The connection to the server failed for an unknown reason."),
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace AIStudio.Tools.Mail;
|
||||
|
||||
public static class MailboxProviderTemplateExtensions
|
||||
{
|
||||
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(MailboxProviderTemplateExtensions).Namespace, nameof(MailboxProviderTemplateExtensions));
|
||||
private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(MailboxProviderTemplateExtensions).Namespace, nameof(MailboxProviderTemplateExtensions));
|
||||
|
||||
extension(MailboxUsernameFormat format)
|
||||
{
|
||||
@@ -13,11 +13,11 @@ public static class MailboxProviderTemplateExtensions
|
||||
/// </summary>
|
||||
public string Description => format switch
|
||||
{
|
||||
MailboxUsernameFormat.EMAIL_ADDRESS => TB("Your full e-mail address."),
|
||||
MailboxUsernameFormat.ADDRESS_NAME_PART => TB("The part of your e-mail address before the @ sign. When that does not work, try your full e-mail address."),
|
||||
MailboxUsernameFormat.DOMAIN_ACCOUNT => string.Format(TB("Your account in the directory of your organization, either as {0} or as {1}. Your IT department knows which form your server expects."), @"DOMAIN\username", "username@domain"),
|
||||
MailboxUsernameFormat.EMAIL_ADDRESS => TA("Your full e-mail address."),
|
||||
MailboxUsernameFormat.ADDRESS_NAME_PART => TA("The part of your e-mail address before the @ sign. When that does not work, try your full e-mail address."),
|
||||
MailboxUsernameFormat.DOMAIN_ACCOUNT => string.Format(TA("Your account in the directory of your organization, either as {0} or as {1}. Your IT department knows which form your server expects."), @"DOMAIN\username", "username@domain"),
|
||||
|
||||
_ => TB("The username your provider gave you."),
|
||||
_ => TA("The username your provider gave you."),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -29,16 +29,16 @@ public static class MailboxProviderTemplateExtensions
|
||||
public IEnumerable<string> GetDescriptions()
|
||||
{
|
||||
if (requirements.HasFlag(MailboxProviderRequirements.IMAP_ACTIVATION))
|
||||
yield return TB("Enable the IMAP access in the settings of your webmail first. The provider may switch it off again after a longer time without use.");
|
||||
yield return TA("Enable the IMAP access in the settings of your webmail first. The provider may switch it off again after a longer time without use.");
|
||||
|
||||
if (requirements.HasFlag(MailboxProviderRequirements.ADMIN_ACTIVATION))
|
||||
yield return TB("Your IT department has to enable IMAP for the server and for your mailbox first.");
|
||||
yield return TA("Your IT department has to enable IMAP for the server and for your mailbox first.");
|
||||
|
||||
if (requirements.HasFlag(MailboxProviderRequirements.APP_PASSWORD))
|
||||
yield return TB("This provider requires an app password, which you create in the security settings of your account. Your usual password does not work here.");
|
||||
yield return TA("This provider requires an app password, which you create in the security settings of your account. Your usual password does not work here.");
|
||||
|
||||
if (requirements.HasFlag(MailboxProviderRequirements.APP_PASSWORD_WITH_TWO_FACTOR))
|
||||
yield return TB("When two-factor authentication is enabled for your account, this provider requires an app password, which you create in the security settings of your account.");
|
||||
yield return TA("When two-factor authentication is enabled for your account, this provider requires an app password, which you create in the security settings of your account.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user