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:
co-authored by
Claude Opus 5.5
parent
da4ceac7d5
commit
837a634a22
@@ -4,19 +4,19 @@ using Shouldly;
|
||||
namespace ClawdDotNet.App.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Wohin eine Instanz protokolliert und sichert — und dass zwei Instanzen dabei nicht
|
||||
/// im selben Ordner landen (#528, Stufe 1).
|
||||
/// Where an instance logs to and backs up to — and that two instances do not end up
|
||||
/// in the same folder (#528, stage 1).
|
||||
///
|
||||
/// <para><b>Der Anlass.</b> Beide Vorgaben waren anwendungsweit. In <c>Startup.log</c>
|
||||
/// standen deshalb abwechselnd Zeilen zweier Instanzen, ohne Kennzeichnung, welche
|
||||
/// gerade spricht; und weil die Aufbewahrung nach Präfix in genau einem Ordner
|
||||
/// aufräumt, warf die laufende Instanz die Archive der anderen mit weg. Solange das so
|
||||
/// ist, ist jede Fehlersuche im Mehrinstanzbetrieb Ratearbeit.</para>
|
||||
/// <para><b>The occasion.</b> Both defaults were application-wide. <c>Startup.log</c>
|
||||
/// therefore contained alternating lines of two instances, without marking which one
|
||||
/// was speaking; and because retention cleans up by prefix in exactly one folder,
|
||||
/// the running instance threw away the other's archives along with its own. As long as that is
|
||||
/// the case, every troubleshooting session in multi-instance operation is guesswork.</para>
|
||||
///
|
||||
/// <para><b>Was aus #375 bleibt.</b> Ein relativer Wert zählt gegen das
|
||||
/// Instanzverzeichnis, nicht gegen das Arbeitsverzeichnis des Prozesses. Ein
|
||||
/// systemd-Dienst ohne <c>WorkingDirectory=</c> startet in <c>/</c>, und <c>"./Logs"</c>
|
||||
/// zeigte dann auf <c>/Logs</c> — für ein Dienstkonto nicht anlegbar.</para>
|
||||
/// <para><b>What remains from #375.</b> A relative value is resolved against the
|
||||
/// instance directory, not against the working directory of the process. A
|
||||
/// systemd service without <c>WorkingDirectory=</c> starts in <c>/</c>, and <c>"./Logs"</c>
|
||||
/// then pointed to <c>/Logs</c> — not creatable for a service account.</para>
|
||||
/// </summary>
|
||||
public sealed class LogDirectoryResolutionTests
|
||||
{
|
||||
@@ -32,13 +32,13 @@ public sealed class LogDirectoryResolutionTests
|
||||
WorkingDirectory = workingDirectory ?? InstancePath
|
||||
};
|
||||
|
||||
// ─── Vorgaben ───
|
||||
// ─── Defaults ───
|
||||
|
||||
[Fact]
|
||||
public void Die_Vorbelegungen_sind_leer()
|
||||
{
|
||||
// Der Kern: Leer heisst „nimm den Ordner dieser Instanz". Steht hier ein Wert,
|
||||
// traegt ihn jede neue Instanz mit sich herum.
|
||||
// The core: empty means "take the folder of this instance". If a value stands here,
|
||||
// every new instance carries it around.
|
||||
new InstanceConfig().LogDirectory.ShouldBe("");
|
||||
new InstanceConfig().BackupDirectory.ShouldBe("");
|
||||
}
|
||||
@@ -58,8 +58,8 @@ public sealed class LogDirectoryResolutionTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Das eigentliche Versprechen von Stufe 1. Alles andere in dieser Datei prüft die
|
||||
/// Mechanik; dieser Test prüft die Zusage.
|
||||
/// The actual promise of stage 1. Everything else in this file checks the
|
||||
/// mechanics; this test checks the promise.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Zwei_Instanzen_ohne_Angabe_teilen_sich_nichts()
|
||||
@@ -77,7 +77,7 @@ public sealed class LogDirectoryResolutionTests
|
||||
backupA.ShouldNotBe(backupB);
|
||||
}
|
||||
|
||||
// ─── Eingetragene Werte ───
|
||||
// ─── Entered values ───
|
||||
|
||||
[Fact]
|
||||
public void Ein_absoluter_Wert_geht_vor()
|
||||
@@ -95,7 +95,7 @@ public sealed class LogDirectoryResolutionTests
|
||||
[Fact]
|
||||
public void Ein_relativer_Wert_zaehlt_gegen_das_Instanzverzeichnis()
|
||||
{
|
||||
// Nicht gegen das Arbeitsverzeichnis des Prozesses — das war der Fehler aus #375.
|
||||
// Not against the working directory of the process — that was the error from #375.
|
||||
AppHost.ResolveLogDirectory(Instance(logDirectory: "./Protokolle"), InstancePath)
|
||||
.ShouldBe(Path.Combine(InstancePath, "Protokolle"));
|
||||
}
|
||||
@@ -112,8 +112,8 @@ public sealed class LogDirectoryResolutionTests
|
||||
[InlineData("Logs")]
|
||||
public void Die_alte_Vorbelegung_zeigt_auf_dieselbe_Stelle_wie_keine_Angabe(string alt)
|
||||
{
|
||||
// Deshalb darf LoadInstanceConfig sie zu „leer" machen, ohne dass sich etwas
|
||||
// verschiebt.
|
||||
// That's why LoadInstanceConfig may turn them into "empty" without anything
|
||||
// shifting.
|
||||
AppHost.ResolveLogDirectory(Instance(logDirectory: alt), InstancePath)
|
||||
.ShouldBe(AppHost.ResolveLogDirectory(Instance(), InstancePath));
|
||||
}
|
||||
@@ -125,13 +125,13 @@ public sealed class LogDirectoryResolutionTests
|
||||
.ShouldBe(Path.Combine(InstancePath, "Logs"));
|
||||
}
|
||||
|
||||
// ─── Bezugspunkt ───
|
||||
// ─── Reference point ───
|
||||
|
||||
[Fact]
|
||||
public void Ein_leeres_WorkingDirectory_faellt_auf_den_Instanzpfad_zurueck()
|
||||
{
|
||||
// Das Feld steht seit CreateInstance absolut in der Datei, kann aber von Hand
|
||||
// geleert worden sein. Dann trägt der Ort, aus dem geladen wurde.
|
||||
// Since CreateInstance the field is in the file as an absolute path, but may have been
|
||||
// emptied by hand. Then the place it was loaded from carries the day.
|
||||
AppHost.ResolveLogDirectory(
|
||||
Instance(logDirectory: "Logs", workingDirectory: ""), InstancePath)
|
||||
.ShouldBe(Path.Combine(InstancePath, "Logs"));
|
||||
@@ -140,8 +140,8 @@ public sealed class LogDirectoryResolutionTests
|
||||
[Fact]
|
||||
public void Ein_relatives_WorkingDirectory_faellt_ebenfalls_auf_den_Instanzpfad_zurueck()
|
||||
{
|
||||
// "./data/" ist die alte Vorbelegung des Feldes und wäre wieder gegen das
|
||||
// Arbeitsverzeichnis des Prozesses aufgelöst worden.
|
||||
// "./data/" is the old default of the field and would again have been resolved against the
|
||||
// working directory of the process.
|
||||
AppHost.ResolveLogDirectory(
|
||||
Instance(logDirectory: "Logs", workingDirectory: "./data/"), InstancePath)
|
||||
.ShouldBe(Path.Combine(InstancePath, "Logs"));
|
||||
|
||||
Reference in New Issue
Block a user