search and ai stabilization work, localization stablized.

This commit is contained in:
master
2026-02-24 23:29:36 +02:00
parent 4f947a8b61
commit b07d27772e
766 changed files with 55299 additions and 3221 deletions

View File

@@ -1,4 +1,5 @@
using System;
using static StellaOps.Localization.T;
namespace StellaOps.Provcache;
@@ -8,27 +9,27 @@ public sealed partial class HttpChunkFetcher
{
if (!baseAddress.IsAbsoluteUri)
{
throw new InvalidOperationException("Lazy fetch base URL must be absolute.");
throw new InvalidOperationException(_t("common.provcache.fetch_url_absolute"));
}
if (!string.IsNullOrWhiteSpace(baseAddress.UserInfo))
{
throw new InvalidOperationException("Lazy fetch base URL must not include user info.");
throw new InvalidOperationException(_t("common.provcache.fetch_url_no_userinfo"));
}
if (string.IsNullOrWhiteSpace(baseAddress.Host))
{
throw new InvalidOperationException("Lazy fetch base URL must include a host.");
throw new InvalidOperationException(_t("common.provcache.fetch_url_host_required"));
}
if (!_allowedSchemes.Contains(baseAddress.Scheme))
{
throw new InvalidOperationException($"Lazy fetch base URL scheme '{baseAddress.Scheme}' is not allowed.");
throw new InvalidOperationException(_t("common.provcache.fetch_url_scheme_invalid", baseAddress.Scheme));
}
if (!_allowAllHosts && !IsHostAllowed(baseAddress.Host, _allowedHosts))
{
throw new InvalidOperationException($"Lazy fetch base URL host '{baseAddress.Host}' is not allowlisted.");
throw new InvalidOperationException(_t("common.provcache.fetch_url_host_invalid", baseAddress.Host));
}
}
}