Create I18N data, part 2 (#429)
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2025-04-27 09:06:05 +02:00
1 parent 90bd450193
commit 2494ee2294
90 files changed
+4648 -1110

No files matched your search

@@ -9,12 +9,9 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
{
public override Tools.Components Component => Tools.Components.EMAIL_ASSISTANT;
protected override string Title => "E-Mail";
protected override string Title => T("E-Mail");
protected override string Description =>
"""
Provide a list of bullet points and some basic information for an e-mail. The assistant will generate an e-mail based on that input.
""";
protected override string Description => T("Provide a list of bullet points and some basic information for an e-mail. The assistant will generate an e-mail based on that input.");
protected override string SystemPrompt =>
$"""
@@ -25,7 +22,7 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
protected override IReadOnlyList<IButtonData> FooterButtons => [];
protected override string SubmitText => "Create email";
protected override string SubmitText => T("Create email");
protected override Func<Task> SubmitAction => this.CreateMail;
@@ -100,12 +97,12 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
private string? ValidateBulletPoints(string content)
{
if(string.IsNullOrWhiteSpace(content))
return "Please provide some content for the e-mail.";
return T("Please provide some content for the e-mail.");
var lines = content.Split('\n', StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines)
if(!line.TrimStart().StartsWith('-'))
return "Please start each line of your content list with a dash (-) to create a bullet point list.";
return T("Please start each line of your content list with a dash (-) to create a bullet point list.");
return null;
}
@@ -113,7 +110,7 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
private string? ValidateTargetLanguage(CommonLanguages language)
{
if(language is CommonLanguages.AS_IS)
return "Please select a target language for the e-mail.";
return T("Please select a target language for the e-mail.");
return null;
}
@@ -121,7 +118,7 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
private string? ValidateCustomLanguage(string language)
{
if(this.selectedTargetLanguage == CommonLanguages.OTHER && string.IsNullOrWhiteSpace(language))
return "Please provide a custom language.";
return T("Please provide a custom language.");
return null;
}
@@ -129,7 +126,7 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
private string? ValidateWritingStyle(WritingStyles style)
{
if(style == WritingStyles.NONE)
return "Please select a writing style for the e-mail.";
return T("Please select a writing style for the e-mail.");
return null;
}
@@ -137,7 +134,7 @@ public partial class AssistantEMail : AssistantBaseCore<SettingsDialogWritingEMa
private string? ValidateHistory(string history)
{
if(this.provideHistory && string.IsNullOrWhiteSpace(history))
return "Please provide some history for the e-mail.";
return T("Please provide some history for the e-mail.");
return null;
}