Stufe 4c (#764): Kommentare in C#, WebUI-Skripten, CSS und HTML auf Englisch

Rund 2.600 Kommentarblöcke in 310 C#-Dateien übersetzt, Begründungen vollständig
erhalten: blockweise gleiche Anzahl wie vorher, kein Block unter 60 % seiner
Länge, der Code außerhalb der Kommentare per Tokenizer byte-identisch geprüft.
Zitate deutscher Oberflächentexte und Testdaten bleiben deutsch.

WebUI: Kommentare in JS/CSS/HTML übersetzt, JSDoc-@param an die in 4b
umbenannten Parameter angeglichen.

Dabei behoben:
- 4b hatte "tag" (HTML-Tag) als deutsches "Tag" gelesen und zu "dayValue"
  gemacht (makeElement, svg, Tagesübersicht) - zurück auf tag/day.
- Aufgaben "InProgress" bekamen die Plakettenart "laufend", für die es nie eine
  CSS-Klasse gab - jetzt "success" wie laufende Instanzen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-10-04 12:45:03 +02:00
co-authored by Claude Opus 5.5
parent da4ceac7d5
commit 837a634a22
311 changed files with 7238 additions and 7252 deletions
@@ -12,17 +12,17 @@ using Shouldly;
namespace ClawdDotNet.Web.Tests;
/// <summary>
/// Der Socket im Instanzverzeichnis (#528, Stufe 2 / E-M1).
/// The socket in the instance directory (#528, stage 2 / E-M1).
///
/// <para>Über ihn wird der Instanzmanager die Instanz erreichen. Drei Zusagen hält
/// dieser Test fest: Er ist <b>immer</b> da, auch ohne Weboberfläche. Er braucht
/// <b>kein Token</b> — seine Grenze steht am Dateisystem. Und der TCP-Port braucht
/// weiterhin eins, denn dort steht keine.</para>
/// <para>The instance manager will reach the instance through it. This test records three
/// promises: it is <b>always</b> there, even without a web UI. It needs
/// <b>no token</b> — its boundary is the file system. And the TCP port still
/// needs one, because there is none there.</para>
///
/// <para>Der letzte Punkt ist der, an dem eine Verwechslung teuer wäre: Wer die
/// Unterscheidung aus fehlenden IP-Adressen erraten wollte, ließe im Zweifel eine
/// TCP-Anfrage ohne Token durch. Sie kommt deshalb aus einer Marke, die der
/// Socket-Zuhörer selbst setzt.</para>
/// <para>The last point is the one where a mix-up would be expensive: whoever wanted to
/// guess the distinction from missing IP addresses would, in case of doubt, let a
/// TCP request through without a token. It therefore comes from a marker that the
/// socket listener sets itself.</para>
/// </summary>
public sealed class InstanceSocketTests : IDisposable
{
@@ -34,7 +34,7 @@ public sealed class InstanceSocketTests : IDisposable
public void Dispose()
{
try { Directory.Delete(_root, recursive: true); }
catch { /* Ein liegengebliebener Testordner faerbt keinen Lauf rot. */ }
catch { /* A leftover test folder does not turn a run red. */ }
}
private AppHost NeuerHost(bool mitWeboberflaeche, int port = 0)
@@ -72,13 +72,13 @@ public sealed class InstanceSocketTests : IDisposable
return port;
}
// ─── Der Socket trägt ───
// ─── The socket holds ───
[Fact]
public async Task Der_Socket_antwortet_auch_ohne_Weboberflaeche()
{
// Die Vorbelegung: webUiEnabled ist aus. Frueher lief dann gar nichts, und die
// Instanz war von aussen nicht ansprechbar.
// The default: webUiEnabled is off. Formerly nothing ran at all then, and the
// instance was not addressable from outside.
await using var host = NeuerHost(mitWeboberflaeche: false);
await using var web = InstanceHttpHost.TryStart(host, NullLoggerFactory.Instance);
@@ -100,12 +100,12 @@ public sealed class InstanceSocketTests : IDisposable
web.ShouldNotBeNull();
// Kein Authorization-Kopf, mit Absicht.
// No Authorization header, on purpose.
using var client = InstanceEndpoint.CreateClient(host.InstancePath);
(await client.GetAsync("/api/info")).EnsureSuccessStatusCode();
}
// ─── Der Port bleibt bewacht ───
// ─── The port stays guarded ───
[Fact]
public async Task Ueber_TCP_gilt_die_Token_Pflicht_weiter()
@@ -127,7 +127,7 @@ public sealed class InstanceSocketTests : IDisposable
(await client.GetAsync("/api/info")).EnsureSuccessStatusCode();
}
// ─── Adressen ───
// ─── Addresses ───
[Fact]
public void Zwei_Instanzen_bekommen_zwei_Adressen()
@@ -142,8 +142,8 @@ public sealed class InstanceSocketTests : IDisposable
[Fact]
public void Dieselbe_Instanz_bekommt_dieselbe_Adresse()
{
// Der Manager rechnet die Adresse aus dem Pfad aus, den er selbst kennt — sie
// muss also aus jeder Schreibweise desselben Verzeichnisses gleich herauskommen.
// The manager computes the address from the path it knows itself — so it
// must come out the same from every spelling of the same directory.
var a = Path.Combine(_root, "Instances", "Test");
var b = Path.Combine(_root, "Instances", "Unterwegs", "..", "Test");
@@ -151,14 +151,14 @@ public sealed class InstanceSocketTests : IDisposable
InstanceEndpoint.SocketPath(a).ShouldBe(InstanceEndpoint.SocketPath(b));
}
// ─── Aufräumen ───
// ─── Cleaning up ───
/// <summary>
/// Eine liegengebliebene Socketdatei darf den nächsten Start nicht verhindern.
/// A leftover socket file must not prevent the next start.
///
/// <para>Ein Unix-Domain-Socket überlebt den Prozess, der ihn angelegt hat. Nach
/// einem harten Ende — genau dem Fall aus #529 — bekäme der nächste Start
/// <c>EADDRINUSE</c> von einem Prozess, den es nicht mehr gibt.</para>
/// <para>A Unix domain socket survives the process that created it. After
/// a hard end — exactly the case from #529 — the next start would get
/// <c>EADDRINUSE</c> from a process that no longer exists.</para>
/// </summary>
[SocketFileFact]
public async Task Eine_liegengebliebene_Socketdatei_haelt_den_Start_nicht_auf()
@@ -190,14 +190,14 @@ public sealed class InstanceSocketTests : IDisposable
}
/// <summary>
/// Die Steuerung des Instanzprozesses: beenden und Fenster nach vorn holen
/// (#528, Stufen 3 und 5).
/// Control of the instance process: end it and bring its window to the front
/// (#528, stages 3 and 5).
///
/// <para><b>Beides gibt es ausschließlich über den Socket.</b> Über TCP existieren die
/// Endpunkte nicht — auch mit gültigem Token nicht, und sie antworten dort mit 404 statt
/// mit 403: Was es nicht gibt, muss man auch nicht erklären. Die Lebensdauer einer Instanz
/// gehört dem Instanzmanager; eine Browsersitzung soll den Prozess, der sie bedient, weder
/// beenden noch sein Fenster aufreißen können.</para>
/// <para><b>Both exist exclusively via the socket.</b> Over TCP the
/// endpoints do not exist — not even with a valid token, and there they answer with 404 instead of
/// 403: what does not exist need not be explained. The lifetime of an instance
/// belongs to the instance manager; a browser session should be able neither to end the process
/// serving it nor to tear open its window.</para>
/// </summary>
public sealed class InstanceControlTests : IDisposable
{
@@ -209,7 +209,7 @@ public sealed class InstanceControlTests : IDisposable
public void Dispose()
{
try { Directory.Delete(_root, recursive: true); }
catch { /* Ein liegengebliebener Testordner faerbt keinen Lauf rot. */ }
catch { /* A leftover test folder does not turn a run red. */ }
}
private AppHost NeuerHost(int port)
@@ -264,7 +264,7 @@ public sealed class InstanceControlTests : IDisposable
using var client = new HttpClient { BaseAddress = new Uri($"http://127.0.0.1:{port}") };
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {Token}");
// Mit gueltigem Token - und trotzdem nicht vorhanden.
// With a valid token - and still not present.
(await client.PostAsync("/api/instanz/beenden", content: null)).StatusCode
.ShouldBe(System.Net.HttpStatusCode.NotFound);