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
+25 -25
View File
@@ -11,17 +11,17 @@ using Shouldly;
namespace ClawdDotNet.Web.Tests;
/// <summary>
/// Die Weboberfläche muss sich zügig beenden lassen — auch mit offenen Ereignisströmen.
/// The web UI must be able to shut down quickly — even with open event streams.
///
/// <para><b>Der Anlass.</b> Ein Ereignisstrom endet nie von selbst. Beim geordneten
/// Herunterfahren legt der Browser nicht auf, also feuert <c>RequestAborted</c> nicht,
/// und Kestrel wartet geduldig darauf, dass die Anfrage fertig wird. Erst nach der Frist
/// von <c>StopAsync</c> wurde abgeschnitten: fünf Sekunden, in denen die Anwendung stand.
/// Sichtbar wurde es beim Instanzwechsel — zwischen „Wechseln" und dem Neustart lag jedes
/// Mal diese Pause, sobald irgendwo ein Browserfenster offen war.</para>
/// <para><b>The occasion.</b> An event stream never ends by itself. During an orderly
/// shutdown the browser does not hang up, so <c>RequestAborted</c> does not fire,
/// and Kestrel waits patiently for the request to finish. Only after the deadline
/// of <c>StopAsync</c> was it cut off: five seconds in which the application stood still.
/// It became visible when switching instances — between "switch" and the restart there was this
/// pause every time, as soon as a browser window was open anywhere.</para>
///
/// <para>Die Ströme hängen jetzt zusätzlich an <c>ApplicationStopping</c>. Dieser Test
/// hält die Zusage fest, damit sie nicht beim nächsten Umbau still verlorengeht.</para>
/// <para>The streams now additionally hang on <c>ApplicationStopping</c>. This test
/// records the promise so it does not get silently lost in the next rework.</para>
/// </summary>
public sealed class ShutdownTests : IDisposable
{
@@ -31,9 +31,9 @@ public sealed class ShutdownTests : IDisposable
private const string Token = "ein-hinreichend-langes-testtoken";
/// <summary>
/// Grosszuegig bemessen: Gemessen wird gegen die Frist von StopAsync (fuenf
/// Sekunden). Bleibt der Test unter zwei, ist die Zusage eingehalten, ohne dass ein
/// langsamer Bauserver ihn rot faerbt.
/// Generously sized: measured against the deadline of StopAsync (five
/// seconds). If the test stays below two, the promise is kept without a
/// slow build server turning it red.
/// </summary>
private static readonly TimeSpan Grenze = TimeSpan.FromSeconds(2);
@@ -63,8 +63,8 @@ public sealed class ShutdownTests : IDisposable
}
/// <summary>
/// Ein freier Port vom Betriebssystem. Eine feste Zahl liesse zwei Testlaeufe
/// nebeneinander scheitern — und genau solche Fehler sucht man am laengsten.
/// A free port from the operating system. A fixed number would let two test runs
/// fail side by side — and those are exactly the errors you search for the longest.
/// </summary>
private static int FreierPort()
{
@@ -87,8 +87,8 @@ public sealed class ShutdownTests : IDisposable
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(30) };
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {Token}");
// Den Strom wirklich oeffnen und die erste Zeile abwarten: Erst dann haelt
// Kestrel die Anfrage, und erst dann prueft der Test das, was er pruefen will.
// Really open the stream and wait for the first line: only then does
// Kestrel hold the request, and only then does the test check what it wants to check.
using var antwort = await client.GetAsync(
$"http://127.0.0.1:{port}/events?token={Token}",
HttpCompletionOption.ResponseHeadersRead);
@@ -125,14 +125,14 @@ public sealed class ShutdownTests : IDisposable
}
/// <summary>
/// Ein belegter Port kostet die Weboberfläche, nicht die Instanz.
/// A taken port costs the web UI, not the instance.
///
/// <para>Vorher gab <c>TryStart</c> hier <c>null</c> zurück, und damit war die
/// gesamte HTTP-Fläche weg. Seit der Socket dazugehört, ist das die falsche
/// Rangfolge: Über ihn wird der Instanzmanager die Instanz erreichen, und ihn wegen
/// eines belegten Ports zu verlieren hieße, die Instanz unerreichbar zu machen, weil
/// eine zweite schon läuft — also genau in dem Fall, für den es den Manager
/// gibt.</para>
/// <para>Previously <c>TryStart</c> returned <c>null</c> here, and with that the
/// entire HTTP surface was gone. Since the socket belongs to it, that is the wrong
/// order of priority: the instance manager will reach the instance through it, and losing it because
/// of a taken port would mean making the instance unreachable because
/// a second one is already running — i.e. exactly in the case the manager
/// exists for.</para>
/// </summary>
[Fact]
public async Task Ein_belegter_Port_kostet_nur_die_Weboberflaeche()
@@ -149,7 +149,7 @@ public sealed class ShutdownTests : IDisposable
web.ShouldNotBeNull();
web!.Url.ShouldBeNull("Die Weboberfläche konnte nicht binden — das gehört gesagt.");
// Der Socket traegt trotzdem.
// The socket holds anyway.
using var client = InstanceEndpoint.CreateClient(host.InstancePath);
(await client.GetAsync("/api/info")).EnsureSuccessStatusCode();
}
@@ -157,6 +157,6 @@ public sealed class ShutdownTests : 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. */ }
}
}