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

@@ -1,21 +1,17 @@
using AIStudio.Agents;
using AIStudio.Chat;
using AIStudio.Settings;
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class ReadWebContent : ComponentBase
public partial class ReadWebContent : MSGComponentBase
{
[Inject]
private HTMLParser HTMLParser { get; init; } = null!;
[Inject]
private AgentTextContentCleaner AgentTextContentCleaner { get; init; } = null!;
[Inject]
protected SettingsManager SettingsManager { get; set; } = null!;
[Parameter]
public string Content { get; set; } = string.Empty;
@@ -156,7 +152,7 @@ public partial class ReadWebContent : ComponentBase
if(shouldUseAgent && this.providerSettings == default)
{
this.isProviderValid = false;
return "Please select a provider to use the cleanup agent.";
return T("Please select a provider to use the cleanup agent.");
}
this.isProviderValid = true;
@@ -168,20 +164,20 @@ public partial class ReadWebContent : ComponentBase
if(string.IsNullOrWhiteSpace(url))
{
this.urlIsValid = false;
return "Please provide a URL to load the content from.";
return T("Please provide a URL to load the content from.");
}
var urlParsingResult = Uri.TryCreate(url, UriKind.Absolute, out var uriResult);
if(!urlParsingResult)
{
this.urlIsValid = false;
return "Please provide a valid URL.";
return T("Please provide a valid URL.");
}
if(uriResult is not { Scheme: "http" or "https" })
{
this.urlIsValid = false;
return "Please provide a valid HTTP or HTTPS URL.";
return T("Please provide a valid HTTP or HTTPS URL.");
}
this.urlIsValid = true;