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
+39 -39
View File
@@ -1,13 +1,13 @@
namespace ClawdDotNet.Manager.Tests;
/// <summary>
/// Ein Instanzprozess, den der Test steuert.
/// An instance process the test controls.
///
/// <para>Ein echter Prozess ließe die Aufsicht nur oberflächlich prüfen: Ein Absturz zum
/// gewünschten Zeitpunkt, ein Prozess, der lebt und schweigt, eine wiederverwendete
/// Prozesskennung — das alles ist mit einem laufenden Programm entweder nicht oder nur
/// mit Wartezeiten herzustellen, und Tests mit Wartezeiten sind Tests, die man
/// irgendwann abschaltet.</para>
/// <para>A real process would only allow checking supervision superficially: a crash at the
/// desired moment, a process that lives and stays silent, a reused
/// process ID — all of that can either not be produced with a running program or only
/// with waiting times, and tests with waiting times are tests that
/// eventually get switched off.</para>
/// </summary>
internal sealed class FakeProcess(int id, DateTimeOffset startedAt) : IInstanceProcess
{
@@ -23,7 +23,7 @@ internal sealed class FakeProcess(int id, DateTimeOffset startedAt) : IInstanceP
public bool Disposed { get; private set; }
/// <summary>Der Prozess endet — mit oder ohne Zutun.</summary>
/// <summary>The process ends — with or without intervention.</summary>
public void Exit(int code)
{
HasExited = true;
@@ -47,19 +47,19 @@ internal sealed class FakeLauncher : IInstanceLauncher
public int Starts { get; private set; }
/// <summary>Welcher Prozess zu welchem Instanzverzeichnis gehört.</summary>
/// <summary>Which process belongs to which instance directory.</summary>
public Dictionary<string, FakeProcess> ByDirectory { get; } =
new(StringComparer.OrdinalIgnoreCase);
/// <summary>Ob für dieses Verzeichnis gerade ein Prozess lebt.</summary>
/// <summary>Whether a process is currently alive for this directory.</summary>
public bool IsRunning(string instanceDirectory)
=> ByDirectory.TryGetValue(Path.GetFullPath(instanceDirectory), out var p)
&& !p.HasExited;
/// <summary>Wenn gesetzt, scheitert der Start damit.</summary>
/// <summary>If set, the start fails with this.</summary>
public Exception? FailStartWith { get; set; }
/// <summary>Was <see cref="Attach"/> liefern soll — bereits laufende Prozesse.</summary>
/// <summary>What <see cref="Attach"/> should deliver — already running processes.</summary>
public Dictionary<int, FakeProcess> Running { get; } = [];
public DateTimeOffset Now { get; set; } = DateTimeOffset.UnixEpoch;
@@ -77,10 +77,10 @@ internal sealed class FakeLauncher : IInstanceLauncher
}
/// <summary>
/// Ein Prozess, der schon lief, bevor dieser Manager kam (E-M6).
/// A process that was already running before this manager came (E-M6).
///
/// <para>Zählt nicht als Start — genau darin liegt der Unterschied, den mehrere Tests
/// prüfen: Was läuft, wird übernommen und nicht ein zweites Mal hochgefahren.</para>
/// <para>Does not count as a start — exactly therein lies the difference several tests
/// check: what runs is taken over and not booted a second time.</para>
/// </summary>
public FakeProcess Fremdstart(string instanceDirectory, int processId)
{
@@ -95,65 +95,65 @@ internal sealed class FakeLauncher : IInstanceLauncher
if (!Running.TryGetValue(processId, out var process))
return null;
// Dieselbe Pruefung wie im Echtbetrieb: gleiche Kennung, aber andere Startzeit
// heisst anderer Prozess.
// The same check as in real operation: same ID, but a different start time
// means a different process.
return (process.StartedAt - startedAt).Duration() > TimeSpan.FromSeconds(2)
? null
: process;
}
}
/// <summary>Der Socket, den der Test antworten oder schweigen lässt.</summary>
/// <summary>The socket that the test lets answer or stay silent.</summary>
internal sealed class FakeChannel : IInstanceChannel
{
/// <summary>Die Antwort für alle Verzeichnisse, sofern keine eigene hinterlegt ist.</summary>
/// <summary>The answer for all directories, unless one of their own is stored.</summary>
public InstanceIdentity? Answer { get; set; }
/// <summary>
/// Antworten je Instanzverzeichnis.
/// Answers per instance directory.
///
/// <para>Nötig, sobald mehr als eine Instanz im Spiel ist: Eine Auskunft, die für jedes
/// Verzeichnis dieselbe Instanz nennt, lässt Tests grün werden, die im Betrieb zwei
/// verschiedene Instanzen verwechseln würden.</para>
/// <para>Needed as soon as more than one instance is involved: information that names the same
/// instance for every directory lets tests turn green that in operation would mix up two
/// different instances.</para>
/// </summary>
public Dictionary<string, InstanceIdentity?> AnswerFor { get; } =
new(StringComparer.OrdinalIgnoreCase);
/// <summary>
/// Wenn gesetzt, antwortet der Socket nur für Instanzen, die dieser Starter
/// tatsächlich gestartet hat — so wie im Betrieb.
/// If set, the socket only answers for instances that this launcher
/// actually started — as in operation.
///
/// <para><b>Ohne das ist ein Testaufbau leicht falsch:</b> Wer die Antwort hinterlegt,
/// bevor der Manager hochfährt, sagt damit „diese Instanz läuft bereits". Der Manager
/// übernimmt sie dann (E-M6), der Starter wird nie angefasst — und der Test prüft etwas
/// anderes, als er behauptet. Das ist mir dreimal passiert; mit dieser Kopplung kann es
/// nicht mehr passieren.</para>
/// <para><b>Without this a test setup is easily wrong:</b> whoever stores the answer
/// before the manager comes up says with it "this instance is already running". The manager
/// then takes it over (E-M6), the launcher is never touched — and the test checks something
/// other than it claims. That happened to me three times; with this coupling it can
/// no longer happen.</para>
///
/// <para>Nicht gesetzt heißt: Die hinterlegte Antwort gilt immer. Das braucht, wer eine
/// Instanz beschreiben will, die läuft, ohne dass dieser Manager sie gestartet hat.</para>
/// <para>Not set means: the stored answer always applies. That is needed by whoever wants to describe an
/// instance that runs without this manager having started it.</para>
/// </summary>
public FakeLauncher? Launcher { get; set; }
/// <summary>
/// Verzeichnisse, deren Instanz verstummt ist: Der Prozess lebt, der Socket schweigt.
/// Directories whose instance has fallen silent: the process lives, the socket is silent.
///
/// <para>Der Fall aus #529 — und der einzige, in dem die Aufsicht von sich aus zur
/// Gewalt greift. Ohne diesen Schalter lässt er sich nicht nachstellen: Die Kopplung
/// an <see cref="Launcher"/> bindet die Antwort sonst genau an das, was hier
/// auseinanderfallen soll.</para>
/// <para>The case from #529 — and the only one in which supervision resorts to
/// force on its own initiative. Without this switch it cannot be reproduced: the coupling
/// to <see cref="Launcher"/> would otherwise bind the answer to exactly what is supposed to
/// fall apart here.</para>
/// </summary>
public HashSet<string> Verstummt { get; } = new(StringComparer.OrdinalIgnoreCase);
/// <summary>Die Instanz hört auf zu antworten, ohne dass ihr Prozess endet.</summary>
/// <summary>The instance stops answering without its process ending.</summary>
public void Verstummen(string instanceDirectory)
=> Verstummt.Add(Path.GetFullPath(instanceDirectory));
public int Calls { get; private set; }
/// <summary>Wie oft die Instanz gebeten wurde, sich zu beenden.</summary>
/// <summary>How often the instance was asked to end itself.</summary>
public int StopRequests { get; private set; }
/// <summary>Ob die Bitte ankommt. Falsch heisst: Die Instanz hoert gar nicht mehr zu.</summary>
/// <summary>Whether the request arrives. False means: the instance no longer listens at all.</summary>
public bool StopRequestArrives { get; set; } = true;
public Task<InstanceIdentity?> AskAsync(string instanceDirectory, CancellationToken ct = default)