mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 18:07:21 +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
@@ -5,6 +5,8 @@ namespace AIStudio.Chat;
|
||||
public static class ChatRoleExtensions
|
||||
{
|
||||
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(ChatRoleExtensions).Namespace, nameof(ChatRoleExtensions));
|
||||
|
||||
private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(ChatRoleExtensions).Namespace, nameof(ChatRoleExtensions));
|
||||
|
||||
/// <param name="role">The role.</param>
|
||||
extension(ChatRole role)
|
||||
@@ -16,7 +18,7 @@ public static class ChatRoleExtensions
|
||||
public string Name => role switch
|
||||
{
|
||||
ChatRole.SYSTEM => TB("System"),
|
||||
ChatRole.USER => TB("You"),
|
||||
ChatRole.USER => TA("You"),
|
||||
ChatRole.AI => TB("AI"),
|
||||
|
||||
_ => TB("Unknown"),
|
||||
|
||||
@@ -621,7 +621,7 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
|
||||
var remove = await this.DialogService.ShowMessageBoxAsync(
|
||||
T("Remove Message"),
|
||||
T("Do you really want to remove this message?"),
|
||||
TA("Do you really want to remove this message?"),
|
||||
T("Yes, remove it"),
|
||||
T("No, keep it"));
|
||||
|
||||
@@ -703,7 +703,7 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
|
||||
var regenerate = await this.DialogService.ShowMessageBoxAsync(
|
||||
T("Regenerate Message"),
|
||||
T("Do you really want to regenerate this message?"),
|
||||
TA("Do you really want to regenerate this message?"),
|
||||
T("Yes, regenerate it"),
|
||||
T("No, keep it"));
|
||||
|
||||
@@ -718,7 +718,7 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
|
||||
var rollback = await this.DialogService.ShowMessageBoxAsync(
|
||||
T("Roll Back Chat"),
|
||||
T("Do you really want to roll back this chat to this AI response? All later messages and their attachments will be permanently removed."),
|
||||
TA("Do you really want to roll back this chat to this AI response? All later messages and their attachments will be permanently removed."),
|
||||
T("Yes, roll back the chat"),
|
||||
T("No, keep it"));
|
||||
|
||||
@@ -747,7 +747,7 @@ public partial class ContentBlockComponent : MSGComponentBase
|
||||
|
||||
var edit = await this.DialogService.ShowMessageBoxAsync(
|
||||
T("Edit Message"),
|
||||
T("Do you really want to edit this message? In order to edit this message, the AI response will be deleted."),
|
||||
TA("Do you really want to edit this message? In order to edit this message, the AI response will be deleted."),
|
||||
T("Yes, remove the AI response and edit it"),
|
||||
T("No, keep it"));
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ public sealed class ContentText : IContent
|
||||
private static readonly ILogger<ContentText> LOGGER = Program.LOGGER_FACTORY.CreateLogger<ContentText>();
|
||||
|
||||
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(ContentText).Namespace, nameof(ContentText));
|
||||
|
||||
private static string TA(string fallbackEN) => I18N.I.TA(fallbackEN, typeof(ContentText).Namespace, nameof(ContentText));
|
||||
|
||||
/// <summary>
|
||||
/// The minimum time between two streaming events, when the user
|
||||
@@ -178,7 +180,7 @@ public sealed class ContentText : IContent
|
||||
}
|
||||
|
||||
if (Interlocked.Exchange(ref UNSTORED_CONTENT_REPORTED, 1) is 0)
|
||||
await MessageBus.INSTANCE.SendWarning(new(AppIcons.PROVENANCE_STORE, TB("AI Studio could not store what the AI received separately from your chat. It remains in the chat itself, so you can still read it.")));
|
||||
await MessageBus.INSTANCE.SendWarning(new(AppIcons.PROVENANCE_STORE, TA("AI Studio could not store what the AI received separately from your chat. It remains in the chat itself, so you can still read it.")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -429,7 +431,7 @@ public sealed class ContentText : IContent
|
||||
// The answer is about to be created without the data the user expected it to use.
|
||||
// Without this message, that answer is indistinguishable from one that did use it:
|
||||
//
|
||||
await MessageBus.INSTANCE.SendWarning(new(AppIcons.DATA_SOURCE, TB("Your data sources could not be used. This answer was created without them.")));
|
||||
await MessageBus.INSTANCE.SendWarning(new(AppIcons.DATA_SOURCE, TA("Your data sources could not be used. This answer was created without them.")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,7 +609,7 @@ public sealed class ContentText : IContent
|
||||
return true;
|
||||
|
||||
var message = string.Format(
|
||||
TB("The selected model '{0}' is no longer available from '{1}' (provider={2}). Please adapt your provider settings."),
|
||||
TA("The selected model '{0}' is no longer available from '{1}' (provider={2}). Please adapt your provider settings."),
|
||||
chatModel.Id,
|
||||
provider.InstanceName,
|
||||
provider.Provider);
|
||||
|
||||
Reference in new issue
Block a user