Refactor for localization support using translation helpers.

This commit is contained in:
Thorsten Sommer 2025-04-17 12:26:14 +02:00
parent 2caf291db3
commit 088e4ad7e3
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
9 changed files with 80 additions and 84 deletions

View File

@ -14,40 +14,40 @@
General General
</MudText> </MudText>
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3"> <MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
<AssistantBlock TSettings="SettingsDialogTextSummarizer" Name="Text Summarizer" Description="Use an LLM to summarize a given text." Icon="@Icons.Material.Filled.TextSnippet" Link="@Routes.ASSISTANT_SUMMARIZER"/> <AssistantBlock TSettings="SettingsDialogTextSummarizer" Name="@T("Text Summarizer")" Description="@T("Use an LLM to summarize a given text.")" Icon="@Icons.Material.Filled.TextSnippet" Link="@Routes.ASSISTANT_SUMMARIZER"/>
<AssistantBlock TSettings="SettingsDialogTranslation" Name="Translation" Description="Translate text into another language." Icon="@Icons.Material.Filled.Translate" Link="@Routes.ASSISTANT_TRANSLATION"/> <AssistantBlock TSettings="SettingsDialogTranslation" Name="@T("Translation")" Description="@T("Translate text into another language.")" Icon="@Icons.Material.Filled.Translate" Link="@Routes.ASSISTANT_TRANSLATION"/>
<AssistantBlock TSettings="SettingsDialogGrammarSpelling" Name="Grammar & Spelling" Description="Check grammar and spelling of a given text." Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_GRAMMAR_SPELLING"/> <AssistantBlock TSettings="SettingsDialogGrammarSpelling" Name="Grammar & Spelling" Description="@T("Check grammar and spelling of a given text.")" Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_GRAMMAR_SPELLING"/>
<AssistantBlock TSettings="SettingsDialogRewrite" Name="Rewrite & Improve" Description="Rewrite and improve a given text for a chosen style." Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_REWRITE"/> <AssistantBlock TSettings="SettingsDialogRewrite" Name="Rewrite & Improve" Description="@T("Rewrite and improve a given text for a chosen style.")" Icon="@Icons.Material.Filled.Edit" Link="@Routes.ASSISTANT_REWRITE"/>
<AssistantBlock TSettings="SettingsDialogSynonyms" Name="Synonyms" Description="Find synonyms for a given word or phrase." Icon="@Icons.Material.Filled.Spellcheck" Link="@Routes.ASSISTANT_SYNONYMS"/> <AssistantBlock TSettings="SettingsDialogSynonyms" Name="@T("Synonyms")" Description="@T("Find synonyms for a given word or phrase.")" Icon="@Icons.Material.Filled.Spellcheck" Link="@Routes.ASSISTANT_SYNONYMS"/>
</MudStack> </MudStack>
<MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6"> <MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6">
Business Business
</MudText> </MudText>
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3"> <MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
<AssistantBlock TSettings="SettingsDialogWritingEMails" Name="E-Mail" Description="Generate an e-mail for a given context." Icon="@Icons.Material.Filled.Email" Link="@Routes.ASSISTANT_EMAIL"/> <AssistantBlock TSettings="SettingsDialogWritingEMails" Name="E-Mail" Description="@T("Generate an e-mail for a given context.")" Icon="@Icons.Material.Filled.Email" Link="@Routes.ASSISTANT_EMAIL"/>
<AssistantBlock TSettings="SettingsDialogMyTasks" Name="My Tasks" Description="Analyze a text or an email for tasks you need to complete." Icon="@Icons.Material.Filled.Task" Link="@Routes.ASSISTANT_MY_TASKS"/> <AssistantBlock TSettings="SettingsDialogMyTasks" Name="@T("My Tasks")" Description="@T("Analyze a text or an email for tasks you need to complete.")" Icon="@Icons.Material.Filled.Task" Link="@Routes.ASSISTANT_MY_TASKS"/>
<AssistantBlock TSettings="SettingsDialogAgenda" Name="Agenda Planner" Description="Generate an agenda for a given meeting, seminar, etc." Icon="@Icons.Material.Filled.CalendarToday" Link="@Routes.ASSISTANT_AGENDA"/> <AssistantBlock TSettings="SettingsDialogAgenda" Name="@T("Agenda Planner")" Description="@T("Generate an agenda for a given meeting, seminar, etc.")" Icon="@Icons.Material.Filled.CalendarToday" Link="@Routes.ASSISTANT_AGENDA"/>
<AssistantBlock TSettings="SettingsDialogJobPostings" Name="Job Posting" Description="Generate a job posting for a given job description." Icon="@Icons.Material.Filled.Work" Link="@Routes.ASSISTANT_JOB_POSTING"/> <AssistantBlock TSettings="SettingsDialogJobPostings" Name="@T("Job Posting")" Description="@T("Generate a job posting for a given job description.")" Icon="@Icons.Material.Filled.Work" Link="@Routes.ASSISTANT_JOB_POSTING"/>
<AssistantBlock TSettings="SettingsDialogLegalCheck" Name="Legal Check" Description="Ask a question about a legal document." Icon="@Icons.Material.Filled.Gavel" Link="@Routes.ASSISTANT_LEGAL_CHECK"/> <AssistantBlock TSettings="SettingsDialogLegalCheck" Name="@T("Legal Check")" Description="@T("Ask a question about a legal document.")" Icon="@Icons.Material.Filled.Gavel" Link="@Routes.ASSISTANT_LEGAL_CHECK"/>
<AssistantBlock TSettings="SettingsDialogIconFinder" Name="Icon Finder" Description="Use an LLM to find an icon for a given context." Icon="@Icons.Material.Filled.FindInPage" Link="@Routes.ASSISTANT_ICON_FINDER"/> <AssistantBlock TSettings="SettingsDialogIconFinder" Name="@T("Icon Finder")" Description="@T("Use an LLM to find an icon for a given context.")" Icon="@Icons.Material.Filled.FindInPage" Link="@Routes.ASSISTANT_ICON_FINDER"/>
</MudStack> </MudStack>
<MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6"> <MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6">
Learning Learning
</MudText> </MudText>
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3"> <MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
<AssistantBlock TSettings="SettingsDialogAssistantBias" Name="Bias of the Day" Description="Learn about one cognitive bias every day." Icon="@Icons.Material.Filled.Psychology" Link="@Routes.ASSISTANT_BIAS"/> <AssistantBlock TSettings="SettingsDialogAssistantBias" Name="@T("Bias of the Day")" Description="@T("Learn about one cognitive bias every day.")" Icon="@Icons.Material.Filled.Psychology" Link="@Routes.ASSISTANT_BIAS"/>
</MudStack> </MudStack>
<MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6"> <MudText Typo="Typo.h4" Class="mb-2 mr-3 mt-6">
Software Engineering Software Engineering
</MudText> </MudText>
<MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3"> <MudStack Row="@true" Wrap="@Wrap.Wrap" Class="mb-3">
<AssistantBlock TSettings="SettingsDialogCoding" Name="Coding" Description="Get coding and debugging support from an LLM." Icon="@Icons.Material.Filled.Code" Link="@Routes.ASSISTANT_CODING"/> <AssistantBlock TSettings="SettingsDialogCoding" Name="@T("Coding")" Description="@T("Get coding and debugging support from an LLM.")" Icon="@Icons.Material.Filled.Code" Link="@Routes.ASSISTANT_CODING"/>
@if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager)) @if (PreviewFeatures.PRE_RAG_2024.IsEnabled(this.SettingsManager))
{ {
<AssistantBlock TSettings="SettingsDialogERIServer" Name="ERI Server" Description="Generate an ERI server to integrate business systems." Icon="@Icons.Material.Filled.PrivateConnectivity" Link="@Routes.ASSISTANT_ERI"/> <AssistantBlock TSettings="SettingsDialogERIServer" Name="@T("ERI Server")" Description="@T("Generate an ERI server to integrate business systems.")" Icon="@Icons.Material.Filled.PrivateConnectivity" Link="@Routes.ASSISTANT_ERI"/>
} }
</MudStack> </MudStack>

View File

@ -25,7 +25,7 @@
// Case: Sidebar can be toggled and is currently visible // Case: Sidebar can be toggled and is currently visible
<InnerScrolling FillEntireHorizontalSpace="@true" Class="border border-solid rounded-lg mb-3" MinWidth="26em"> <InnerScrolling FillEntireHorizontalSpace="@true" Class="border border-solid rounded-lg mb-3" MinWidth="26em">
<HeaderContent> <HeaderContent>
<MudTooltip Text="Hide your workspaces" Placement="@TOOLBAR_TOOLTIP_PLACEMENT"> <MudTooltip Text="@T("Hide your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
<MudIconButton Size="Size.Large" Icon="@this.WorkspaceSidebarToggleIcon" OnClick="() => this.ToggleWorkspaceSidebar()"/> <MudIconButton Size="Size.Large" Icon="@this.WorkspaceSidebarToggleIcon" OnClick="() => this.ToggleWorkspaceSidebar()"/>
</MudTooltip> </MudTooltip>
</HeaderContent> </HeaderContent>
@ -88,7 +88,7 @@
<MudDrawerHeader> <MudDrawerHeader>
<MudStack Row="@true" AlignItems="AlignItems.Center"> <MudStack Row="@true" AlignItems="AlignItems.Center">
<MudText Typo="Typo.h6" Class="mr-3"> <MudText Typo="Typo.h6" Class="mr-3">
Your workspaces @T("Your workspaces")
</MudText> </MudText>
<MudIconButton Icon="@Icons.Material.Filled.Close" Variant="Variant.Filled" Color="Color.Default" Size="Size.Small" OnClick="() => this.ToggleWorkspacesOverlay()"/> <MudIconButton Icon="@Icons.Material.Filled.Close" Variant="Variant.Filled" Color="Color.Default" Size="Size.Small" OnClick="() => this.ToggleWorkspacesOverlay()"/>
</MudStack> </MudStack>

View File

@ -12,31 +12,29 @@
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.MenuBook" HeaderText="Introduction" IsExpanded="@true"> <ExpansionPanel HeaderIcon="@Icons.Material.Filled.MenuBook" HeaderText="Introduction" IsExpanded="@true">
<MudText Typo="Typo.h5" Class="mb-3"> <MudText Typo="Typo.h5" Class="mb-3">
Welcome to MindWork AI Studio! @T("Welcome to MindWork AI Studio!")
</MudText> </MudText>
<MudText Typo="Typo.body1" Class="mb-3" Style="text-align: justify; hyphens: auto;"> <MudText Typo="Typo.body1" Class="mb-3" Style="text-align: justify; hyphens: auto;">
Thank you for considering MindWork AI Studio for your AI needs. This app is designed to help you harness @T("Thank you for considering MindWork AI Studio for your AI needs. This app is designed to help you harness the power of Large Language Models (LLMs). Please note that this app doesn't come with an integrated LLM. Instead, you will need to bring an API key from a suitable provider.")
the power of Large Language Models (LLMs). Please note that this app doesn't come with an integrated
LLM. Instead, you will need to bring an API key from a suitable provider.
</MudText> </MudText>
<MudText Typo="Typo.body1" Class="mb-3"> <MudText Typo="Typo.body1" Class="mb-3">
Here's what makes MindWork AI Studio stand out: @T("Here's what makes MindWork AI Studio stand out:")
</MudText> </MudText>
<MudTextList Icon="@Icons.Material.Filled.CheckCircle" Clickable="@true" Items="@ITEMS_ADVANTAGES" Class="mb-3"/> <MudTextList Icon="@Icons.Material.Filled.CheckCircle" Clickable="@true" Items="@this.itemsAdvantages" Class="mb-3"/>
<MudText Typo="Typo.body1" Class="mb-3"> <MudText Typo="Typo.body1" Class="mb-3">
We hope you enjoy using MindWork AI Studio to bring your AI projects to life! @T("We hope you enjoy using MindWork AI Studio to bring your AI projects to life!")
</MudText> </MudText>
</ExpansionPanel> </ExpansionPanel>
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="Last Changelog"> <ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="@T("Last Changelog")">
<MudMarkdown Value="@this.LastChangeContent" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/> <MudMarkdown Value="@this.LastChangeContent" OverrideHeaderTypo="@Markdown.OverrideHeaderTypo"/>
</ExpansionPanel> </ExpansionPanel>
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Lightbulb" HeaderText="Vision"> <ExpansionPanel HeaderIcon="@Icons.Material.Filled.Lightbulb" HeaderText="@T("Vision")">
<Vision/> <Vision/>
</ExpansionPanel> </ExpansionPanel>
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.RocketLaunch" HeaderText="Quick Start Guide"> <ExpansionPanel HeaderIcon="@Icons.Material.Filled.RocketLaunch" HeaderText="@T("Quick Start Guide")">
<MudMarkdown OverrideHeaderTypo="@Markdown.OverrideHeaderTypo" Value="@QUICK_START_GUIDE"/> <MudMarkdown OverrideHeaderTypo="@Markdown.OverrideHeaderTypo" Value="@QUICK_START_GUIDE"/>
</ExpansionPanel> </ExpansionPanel>

View File

@ -13,12 +13,27 @@ public partial class Home : MSGComponentBase
private string LastChangeContent { get; set; } = string.Empty; private string LastChangeContent { get; set; } = string.Empty;
private TextItem[] itemsAdvantages = [];
#region Overrides of ComponentBase #region Overrides of ComponentBase
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
await this.ReadLastChangeAsync(); await this.ReadLastChangeAsync();
await base.OnInitializedAsync(); await base.OnInitializedAsync();
this.itemsAdvantages = [
new(T("Free of charge"), T("The app is free to use, both for personal and commercial purposes.")),
new(T("Independence"), T("You are not tied to any single provider. Instead, you might choose the provider that best suits your needs. Right now, we support OpenAI (GPT4o, o1, etc.), Mistral, Anthropic (Claude), Google Gemini, xAI (Grok), DeepSeek, and self-hosted models using llama.cpp, ollama, LM Studio, Groq, or Fireworks. For scientists and employees of research institutions, we also support Helmholtz and GWDG AI services. These are available through federated logins like eduGAIN to all 18 Helmholtz Centers, the Max Planck Society, most German, and many international universities.")),
new(T("Assistants"), T("You just want to quickly translate a text? AI Studio has so-called assistants for such and other tasks. No prompting is necessary when working with these assistants.")),
new(T("Unrestricted usage"), T("Unlike services like ChatGPT, which impose limits after intensive use, MindWork AI Studio offers unlimited usage through the providers API.")),
new(T("Cost-effective"), T("You only pay for what you use, which can be cheaper than monthly subscription services like ChatGPT Plus, especially if used infrequently. But beware, here be dragons: For extremely intensive usage, the API costs can be significantly higher. Unfortunately, providers currently do not offer a way to display current costs in the app. Therefore, check your account with the respective provider to see how your costs are developing. When available, use prepaid and set a cost limit.")),
new(T("Privacy"), T("You can control which providers receive your data using the provider confidence settings. For example, you can set different protection levels for writing emails compared to general chats, etc. Additionally, most providers guarantee that they won't use your data to train new AI systems.")),
new(T("Flexibility"), T("Choose the provider and model best suited for your current task.")),
new(T("No bloatware"), T("The app requires minimal storage for installation and operates with low memory usage. Additionally, it has a minimal impact on system resources, which is beneficial for battery life.")),
];
this.StateHasChanged();
} }
#endregion #endregion
@ -36,18 +51,6 @@ public partial class Home : MSGComponentBase
this.LastChangeContent = await response.Content.ReadAsStringAsync(); this.LastChangeContent = await response.Content.ReadAsStringAsync();
} }
private static readonly TextItem[] ITEMS_ADVANTAGES =
[
new("Free of charge", "The app is free to use, both for personal and commercial purposes."),
new("Independence", "You are not tied to any single provider. Instead, you might choose the provider that best suits your needs. Right now, we support OpenAI (GPT4o, o1, etc.), Mistral, Anthropic (Claude), Google Gemini, xAI (Grok), DeepSeek, and self-hosted models using llama.cpp, ollama, LM Studio, Groq, or Fireworks. For scientists and employees of research institutions, we also support Helmholtz and GWDG AI services. These are available through federated logins like eduGAIN to all 18 Helmholtz Centers, the Max Planck Society, most German, and many international universities."),
new("Assistants", "You just want to quickly translate a text? AI Studio has so-called assistants for such and other tasks. No prompting is necessary when working with these assistants."),
new("Unrestricted usage", "Unlike services like ChatGPT, which impose limits after intensive use, MindWork AI Studio offers unlimited usage through the providers API."),
new("Cost-effective", "You only pay for what you use, which can be cheaper than monthly subscription services like ChatGPT Plus, especially if used infrequently. But beware, here be dragons: For extremely intensive usage, the API costs can be significantly higher. Unfortunately, providers currently do not offer a way to display current costs in the app. Therefore, check your account with the respective provider to see how your costs are developing. When available, use prepaid and set a cost limit."),
new("Privacy", "You can control which providers receive your data using the provider confidence settings. For example, you can set different protection levels for writing emails compared to general chats, etc. Additionally, most providers guarantee that they won't use your data to train new AI systems."),
new("Flexibility", "Choose the provider and model best suited for your current task."),
new("No bloatware", "The app requires minimal storage for installation and operates with low memory usage. Additionally, it has a minimal impact on system resources, which is beneficial for battery life."),
];
private const string QUICK_START_GUIDE = private const string QUICK_START_GUIDE =
""" """
Ready to dive in and get started with MindWork AI Studio? This quick start guide will help you set up everything you need to start using the app. Ready to dive in and get started with MindWork AI Studio? This quick start guide will help you set up everything you need to start using the app.

View File

@ -4,7 +4,7 @@
<div class="inner-scrolling-context"> <div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-2"> <MudText Typo="Typo.h3" Class="mb-2">
Plugins @T("Plugins")
</MudText> </MudText>
<PreviewExperimental ApplyInnerScrollingFix="true"/> <PreviewExperimental ApplyInnerScrollingFix="true"/>
@ -18,8 +18,8 @@
<col style="width: 12em;"/> <col style="width: 12em;"/>
</ColGroup> </ColGroup>
<HeaderContent> <HeaderContent>
<MudTh colspan="2">Plugins</MudTh> <MudTh colspan="2">@T("Plugins")</MudTh>
<MudTh>Actions</MudTh> <MudTh>@T("Actions")</MudTh>
</HeaderContent> </HeaderContent>
<GroupHeaderTemplate> <GroupHeaderTemplate>
<MudTh Class="mud-table-cell-custom-group" colspan="3"> <MudTh Class="mud-table-cell-custom-group" colspan="3">
@ -27,19 +27,19 @@
{ {
case GROUP_ENABLED: case GROUP_ENABLED:
<MudText Typo="Typo.h6" Class="mb-2"> <MudText Typo="Typo.h6" Class="mb-2">
Enabled Plugins @T("Enabled Plugins")
</MudText> </MudText>
break; break;
case GROUP_DISABLED: case GROUP_DISABLED:
<MudText Typo="Typo.h6" Class="mb-2"> <MudText Typo="Typo.h6" Class="mb-2">
Disabled Plugins @T("Disabled Plugins")
</MudText> </MudText>
break; break;
case GROUP_INTERNAL: case GROUP_INTERNAL:
<MudText Typo="Typo.h6" Class="mb-2"> <MudText Typo="Typo.h6" Class="mb-2">
Internal Plugins @T("Internal Plugins")
</MudText> </MudText>
break; break;
} }
@ -67,7 +67,7 @@
@if (!context.IsInternal) @if (!context.IsInternal)
{ {
var isEnabled = this.SettingsManager.IsPluginEnabled(context); var isEnabled = this.SettingsManager.IsPluginEnabled(context);
<MudTooltip Text="@(isEnabled ? "Disable plugin" : "Enable plugin")"> <MudTooltip Text="@(isEnabled ? T("Disable plugin") : T("Enable plugin"))">
<MudSwitch T="bool" Value="@isEnabled" ValueChanged="@(_ => this.PluginActivationStateChanged(context))"/> <MudSwitch T="bool" Value="@isEnabled" ValueChanged="@(_ => this.PluginActivationStateChanged(context))"/>
</MudTooltip> </MudTooltip>
} }

View File

@ -4,7 +4,7 @@
@inherits MSGComponentBase @inherits MSGComponentBase
<div class="inner-scrolling-context"> <div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-12">Settings</MudText> <MudText Typo="Typo.h3" Class="mb-12">@T("Settings")</MudText>
<InnerScrolling> <InnerScrolling>
<MudExpansionPanels Class="mb-3" MultiExpansion="@false"> <MudExpansionPanels Class="mb-3" MultiExpansion="@false">

View File

@ -2,22 +2,26 @@
@inherits MSGComponentBase @inherits MSGComponentBase
<div class="inner-scrolling-context"> <div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-2">Supporters</MudText> <MudText Typo="Typo.h3" Class="mb-2">
@T("Supporters")
</MudText>
<InnerScrolling> <InnerScrolling>
<MudExpansionPanels> <MudExpansionPanels>
<ExpansionPanel HeaderText="Financial Support" IsExpanded="@true" HeaderIcon="@Icons.Material.Filled.AttachMoney"> <ExpansionPanel HeaderText="@T("Financial Support")" IsExpanded="@true" HeaderIcon="@Icons.Material.Filled.AttachMoney">
<div class="border-solid border-2 rounded-lg pa-3 mb-6"> <div class="border-solid border-2 rounded-lg pa-3 mb-6">
<MudText Typo="Typo.h4" Class="mb-2">Our Titans</MudText> <MudText Typo="Typo.h4" Class="mb-2">
<MudText Typo="Typo.body1" Style="text-align: justify; hyphens: auto;" Class="mb-3"> @T("Our Titans")
In this section, we highlight the titan supporters of MindWork AI Studio. Titans are prestigious companies that provide significant support to our mission.
</MudText> </MudText>
<MudText Typo="Typo.body1" Style="text-align: justify; hyphens: auto;" Class="mb-3"> <MudText Typo="Typo.body1" Style="text-align: justify; hyphens: auto;" Class="mb-3">
For companies, sponsoring MindWork AI Studio is not only a way to support innovation but also a valuable opportunity for public relations and marketing. Your company's name and logo will be featured prominently, showcasing your commitment to using cutting-edge AI tools and enhancing your reputation as an innovative enterprise. @T("In this section, we highlight the titan supporters of MindWork AI Studio. Titans are prestigious companies that provide significant support to our mission.")
</MudText>
<MudText Typo="Typo.body1" Style="text-align: justify; hyphens: auto;" Class="mb-3">
@T("For companies, sponsoring MindWork AI Studio is not only a way to support innovation but also a valuable opportunity for public relations and marketing. Your company's name and logo will be featured prominently, showcasing your commitment to using cutting-edge AI tools and enhancing your reputation as an innovative enterprise.")
</MudText> </MudText>
<MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.Business" Variant="Variant.Filled" Target="_blank"> <MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.Business" Variant="Variant.Filled" Target="_blank">
Become our first Titan @T("Become our first Titan")
</MudButton> </MudButton>
</div> </div>
@ -26,27 +30,27 @@
<MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3"> <MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3">
<MudText Typo="Typo.h4" Class="mb-3 d-flex align-center"> <MudText Typo="Typo.h4" Class="mb-3 d-flex align-center">
<MudIcon Icon="@Icons.Material.Filled.People" Size="Size.Large" class="mr-2"/> <MudIcon Icon="@Icons.Material.Filled.People" Size="Size.Large" class="mr-2"/>
Individual Contributors @T("Individual Contributors")
</MudText> </MudText>
<MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.People" Variant="Variant.Filled" Target="_blank"> <MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.People" Variant="Variant.Filled" Target="_blank">
Become a contributor @T("Become a contributor")
</MudButton> </MudButton>
<MudText Typo="Typo.h6" Class="mt-8"> <MudText Typo="Typo.h6" Class="mt-8">
The first 10 supporters who make a monthly contribution: @T("The first 10 supporters who make a monthly contribution:")
</MudText> </MudText>
<MudList T="string"> <MudList T="string">
<Supporter Name="richard-stanton" Type="SupporterType.INDIVIDUAL" URL="https://github.com/richard-stanton" Acknowledgment="Thank you, Richard, for being the first."/> <Supporter Name="richard-stanton" Type="SupporterType.INDIVIDUAL" URL="https://github.com/richard-stanton" Acknowledgment="@T("Thank you, Richard, for being the first.")"/>
<Supporter Name="peerschuett" Type="SupporterType.INDIVIDUAL" URL="https://github.com/peerschuett" Acknowledgment="Thank you, Peer, for your courage in being the second person to support the project financially."/> <Supporter Name="peerschuett" Type="SupporterType.INDIVIDUAL" URL="https://github.com/peerschuett" Acknowledgment="@T("Thank you, Peer, for your courage in being the second person to support the project financially.")"/>
<Supporter Name="donework" Type="SupporterType.INDIVIDUAL" URL="https://github.com/donework" Acknowledgment="Thanks Dominic for being the third supporter."/> <Supporter Name="donework" Type="SupporterType.INDIVIDUAL" URL="https://github.com/donework" Acknowledgment="@T("Thanks Dominic for being the third supporter.")"/>
</MudList> </MudList>
<MudText Typo="Typo.h6" Class="mt-8"> <MudText Typo="Typo.h6" Class="mt-8">
The first 10 supporters who make a one-time contribution: @T("The first 10 supporters who make a one-time contribution:")
</MudText> </MudText>
<MudList T="string"> <MudList T="string">
<Supporter Name="Bessieres" Type="SupporterType.INDIVIDUAL" URL="https://github.com/Bessieres" Acknowledgment="Thank you for being the first to contribute a one-time donation."/> <Supporter Name="Bessieres" Type="SupporterType.INDIVIDUAL" URL="https://github.com/Bessieres" Acknowledgment="@T("Thank you for being the first to contribute a one-time donation.")"/>
</MudList> </MudList>
</MudPaper> </MudPaper>
</MudItem> </MudItem>
@ -55,11 +59,11 @@
<MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3"> <MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3">
<MudText Typo="Typo.h4" Class="mb-3 d-flex align-center"> <MudText Typo="Typo.h4" Class="mb-3 d-flex align-center">
<MudIcon Icon="@Icons.Material.Filled.Business" Size="Size.Large" class="mr-2"/> <MudIcon Icon="@Icons.Material.Filled.Business" Size="Size.Large" class="mr-2"/>
Business Contributors @T("Business Contributors")
</MudText> </MudText>
<MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.Business" Variant="Variant.Filled" Target="_blank"> <MudButton Href="https://github.com/sponsors/MindWorkAI" StartIcon="@Icons.Material.Filled.Business" Variant="Variant.Filled" Target="_blank">
Become a contributor @T("Become a contributor")
</MudButton> </MudButton>
</MudPaper> </MudPaper>
</MudItem> </MudItem>
@ -73,14 +77,14 @@
<MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3"> <MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3">
<MudText Typo="Typo.h4" Class="mb-3 d-flex align-center"> <MudText Typo="Typo.h4" Class="mb-3 d-flex align-center">
<MudIcon Icon="@Icons.Material.Filled.Code" Size="Size.Large" class="mr-2"/> <MudIcon Icon="@Icons.Material.Filled.Code" Size="Size.Large" class="mr-2"/>
Code Contributions @T("Code Contributions")
</MudText> </MudText>
<MudList T="string"> <MudList T="string">
<Supporter Name="DevNullx64" Type="SupporterType.INDIVIDUAL" URL="https://github.com/DevNullx64" Acknowledgment="Thanks Luc for your build script contribution."/> <Supporter Name="DevNullx64" Type="SupporterType.INDIVIDUAL" URL="https://github.com/DevNullx64" Acknowledgment="@T("Thanks Luc for your build script contribution.")"/>
<Supporter Name="SolsticeSpectrum" Type="SupporterType.INDIVIDUAL" URL="https://github.com/SolsticeSpectrum" Acknowledgment="Thanks for your build script contribution."/> <Supporter Name="SolsticeSpectrum" Type="SupporterType.INDIVIDUAL" URL="https://github.com/SolsticeSpectrum" Acknowledgment="@T("Thanks for your build script contribution.")"/>
<Supporter Name="peerschuett" Type="SupporterType.INDIVIDUAL" URL="https://github.com/peerschuett" Acknowledgment="Thank you, Peer, for familiarizing yourself with C#, providing excellent contributions like the Alibaba and Hugging Face providers, and revising the settings management."/> <Supporter Name="peerschuett" Type="SupporterType.INDIVIDUAL" URL="https://github.com/peerschuett" Acknowledgment="@T("Thank you, Peer, for familiarizing yourself with C#, providing excellent contributions like the Alibaba and Hugging Face providers, and revising the settings management.")"/>
<Supporter Name="nilskruthoff" Type="SupporterType.INDIVIDUAL" URL="https://github.com/nilskruthoff" Acknowledgment="Thanks, Nils, for taking the time to learn Rust and build the foundation for local retrieval."/> <Supporter Name="nilskruthoff" Type="SupporterType.INDIVIDUAL" URL="https://github.com/nilskruthoff" Acknowledgment="@T("Thanks, Nils, for taking the time to learn Rust and build the foundation for local retrieval.")"/>
</MudList> </MudList>
</MudPaper> </MudPaper>
</MudItem> </MudItem>
@ -89,11 +93,11 @@
<MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3"> <MudPaper Elevation="3" Class="border-solid border rounded-lg pa-3">
<MudText Typo="Typo.h4" Class="mb-3 d-flex align-start"> <MudText Typo="Typo.h4" Class="mb-3 d-flex align-start">
<MudIcon Icon="@Icons.Material.Filled.Image" Size="Size.Large" class="mr-2"/> <MudIcon Icon="@Icons.Material.Filled.Image" Size="Size.Large" class="mr-2"/>
Moderation, Design, Wiki, and Documentation @T("Moderation, Design, Wiki, and Documentation")
</MudText> </MudText>
<MudList T="string"> <MudList T="string">
<Supporter Name="KeSah001" Type="SupporterType.INDIVIDUAL" URL="https://github.com/KeSah001" Acknowledgment="Thank you very much, Kerstin, for taking care of creating the Wiki."/> <Supporter Name="KeSah001" Type="SupporterType.INDIVIDUAL" URL="https://github.com/KeSah001" Acknowledgment="@T("Thank you very much, Kerstin, for taking care of creating the Wiki.")"/>
</MudList> </MudList>
</MudPaper> </MudPaper>
</MudItem> </MudItem>

View File

@ -3,7 +3,7 @@
<div class="inner-scrolling-context"> <div class="inner-scrolling-context">
<MudText Typo="Typo.h3" Class="mb-2"> <MudText Typo="Typo.h3" Class="mb-2">
Writer @T("Writer")
</MudText> </MudText>
<PreviewExperimental ApplyInnerScrollingFix="true"/> <PreviewExperimental ApplyInnerScrollingFix="true"/>
@ -13,7 +13,7 @@
<MudTextField <MudTextField
@ref="@this.textField" @ref="@this.textField"
T="string" T="string"
Label="Write your text" Label="@T("Write your text")"
@bind-Text="@this.userInput" @bind-Text="@this.userInput"
Immediate="@true" Immediate="@true"
Lines="16" Lines="16"
@ -27,7 +27,7 @@
<MudTextField <MudTextField
T="string" T="string"
Label="Your stage directions" Label="@T("Your stage directions")"
@bind-Text="@this.userDirection" @bind-Text="@this.userDirection"
Immediate="@true" Immediate="@true"
Lines="4" Lines="4"
@ -45,7 +45,7 @@
} }
<MudTextField <MudTextField
T="string" T="string"
Label="Suggestion" Label="@T("Suggestion")"
@bind-Text="@this.suggestion" @bind-Text="@this.suggestion"
ReadOnly="@true" ReadOnly="@true"
Lines="3" Lines="3"

View File

@ -9,7 +9,7 @@ using Timer = System.Timers.Timer;
namespace AIStudio.Pages; namespace AIStudio.Pages;
public partial class Writer : MSGComponentBase, IAsyncDisposable public partial class Writer : MSGComponentBase
{ {
[Inject] [Inject]
private ILogger<Chat> Logger { get; init; } = null!; private ILogger<Chat> Logger { get; init; } = null!;
@ -158,13 +158,4 @@ public partial class Writer : MSGComponentBase, IAsyncDisposable
this.suggestion = string.Join(' ', words.Skip(1)); this.suggestion = string.Join(' ', words.Skip(1));
this.StateHasChanged(); this.StateHasChanged();
} }
#region Implementation of IAsyncDisposable
public ValueTask DisposeAsync()
{
return ValueTask.CompletedTask;
}
#endregion
} }