diff --git a/src/Infrastructure/BotSharp.Abstraction/Translation/Attributes/TranslationAttribute.cs b/src/Infrastructure/BotSharp.Abstraction/Translation/Attributes/TranslationAttribute.cs new file mode 100644 index 00000000..2df5c539 --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Translation/Attributes/TranslationAttribute.cs @@ -0,0 +1,7 @@ +namespace BotSharp.Abstraction.Translation.Attributes; + +public class TranslationAttribute : Attribute +{ + + +} diff --git a/src/Infrastructure/BotSharp.Abstraction/Translation/ITranslationService.cs b/src/Infrastructure/BotSharp.Abstraction/Translation/ITranslationService.cs new file mode 100644 index 00000000..fdd58b1e --- /dev/null +++ b/src/Infrastructure/BotSharp.Abstraction/Translation/ITranslationService.cs @@ -0,0 +1,11 @@ + +using BotSharp.Abstraction.Messaging.Models.RichContent; +using BotSharp.Abstraction.Messaging; + +namespace BotSharp.Abstraction.Translation; + +public interface ITranslationService +{ + + T Translate(T data, string language) where T : RichContent; +} diff --git a/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs b/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs index 5c215884..8fb6d9a5 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs @@ -8,6 +8,7 @@ using BotSharp.Core.Instructs; using BotSharp.Core.Messaging; using BotSharp.Core.Routing.Planning; using BotSharp.Core.Templating; +using BotSharp.Core.Translation; using Microsoft.Extensions.Configuration; namespace BotSharp.Core.Conversations; @@ -35,6 +36,7 @@ public class ConversationPlugin : IBotSharpPlugin services.AddScoped(); services.AddScoped(); services.AddScoped(); + services.AddScoped(); // Rich content messaging services.AddScoped(); diff --git a/src/Infrastructure/BotSharp.Core/Translation/TranslationService.cs b/src/Infrastructure/BotSharp.Core/Translation/TranslationService.cs new file mode 100644 index 00000000..47a7e70a --- /dev/null +++ b/src/Infrastructure/BotSharp.Core/Translation/TranslationService.cs @@ -0,0 +1,24 @@ +using BotSharp.Abstraction.Messaging; +using BotSharp.Abstraction.Messaging.Models.RichContent; + +namespace BotSharp.Core.Translation; + +public class TranslationService : ITranslationService +{ + private readonly IServiceProvider _services; + private readonly ILogger _logger; + + public TranslationService(IServiceProvider services, + ILogger logger) + { + _services = services; + _logger = logger; + } + + public T Translate(T data, string language) where T : RichContent + { + + + return data; + } +} diff --git a/src/Infrastructure/BotSharp.Core/Using.cs b/src/Infrastructure/BotSharp.Core/Using.cs index fbb1c8df..769f318f 100644 --- a/src/Infrastructure/BotSharp.Core/Using.cs +++ b/src/Infrastructure/BotSharp.Core/Using.cs @@ -22,6 +22,7 @@ global using BotSharp.Abstraction.Agents.Models; global using BotSharp.Abstraction.Functions.Models; global using BotSharp.Abstraction.Repositories; global using BotSharp.Abstraction.Repositories.Filters; +global using BotSharp.Abstraction.Translation; global using BotSharp.Core.Repository; global using BotSharp.Core.Routing; global using BotSharp.Core.Agents.Services;