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,14 +4,14 @@ using Shouldly;
|
||||
namespace ClawdDotNet.App.Tests.Services;
|
||||
|
||||
/// <summary>
|
||||
/// #376: Jedes Modul schreibt in seine eigene Datei, und eingesammelt wurde Datei für
|
||||
/// Datei — also alphabetisch nach Modulname. In der Log-Ansicht standen die Zeilen
|
||||
/// damit in Blöcken je Modul statt in der Reihenfolge, in der sie entstanden sind.
|
||||
/// Beobachtet wurde eine Zeile von 14:34:40 über vier Zeilen von 14:34:39.
|
||||
/// #376: Every module writes into its own file, and collection happened file by
|
||||
/// file — i.e. alphabetically by module name. In the log view the lines thus stood
|
||||
/// in blocks per module instead of in the order in which they came into being.
|
||||
/// Observed was a line from 14:34:40 above four lines from 14:34:39.
|
||||
///
|
||||
/// Das Dateisystem wird hier nicht abstrahiert: <see cref="LogTail"/> ist genau der
|
||||
/// Umgang mit echten, nebenher wachsenden Dateien — eine Abstraktion würde das
|
||||
/// Verhalten verstecken, um das es geht.
|
||||
/// The file system is not abstracted here: <see cref="LogTail"/> is exactly the
|
||||
/// handling of real files that grow alongside — an abstraction would hide the
|
||||
/// behavior this is about.
|
||||
/// </summary>
|
||||
public sealed class LogTailTests : IDisposable
|
||||
{
|
||||
@@ -23,8 +23,8 @@ public sealed class LogTailTests : IDisposable
|
||||
_logDirectory = Path.Combine(
|
||||
Path.GetTempPath(), "clawd-tests", Guid.NewGuid().ToString("N"), "Logs");
|
||||
|
||||
// LogTail liest ausschließlich das Verzeichnis des heutigen Tages, und zwar
|
||||
// nach Ortszeit — die Schreibseite legt es genauso an.
|
||||
// LogTail reads exclusively the directory of today, by
|
||||
// local time — the writing side creates it the same way.
|
||||
_today = Path.Combine(_logDirectory, DateTime.Now.ToString("yyyy-MM-dd"));
|
||||
Directory.CreateDirectory(_today);
|
||||
}
|
||||
@@ -32,7 +32,7 @@ public sealed class LogTailTests : IDisposable
|
||||
public void Dispose()
|
||||
{
|
||||
try { Directory.Delete(Path.GetDirectoryName(_logDirectory)!, recursive: true); }
|
||||
catch { /* Aufräumen ist Nebensache */ }
|
||||
catch { /* Cleaning up is secondary */ }
|
||||
}
|
||||
|
||||
private void Write(string module, params string[] lines)
|
||||
@@ -41,14 +41,14 @@ public sealed class LogTailTests : IDisposable
|
||||
private LogTail Tail() => new(_logDirectory);
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// Reihenfolge über Moduldateien hinweg
|
||||
// Order across module files
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
[Fact]
|
||||
public void Zeilen_aus_mehreren_Modulen_stehen_in_zeitlicher_Reihenfolge()
|
||||
{
|
||||
// Genau der beobachtete Fall: "Deploymentcenter" steht alphabetisch vor
|
||||
// "Startup", seine Zeile ist aber die jüngste von allen.
|
||||
// Exactly the observed case: "Deploymentcenter" comes alphabetically before
|
||||
// "Startup", but its line is the most recent of all.
|
||||
Write("Deploymentcenter", "[14:34:40.246] [INF] kein Token hinterlegt");
|
||||
Write("Startup",
|
||||
"[14:34:39.840] [INF] ClawdDotNet startet",
|
||||
@@ -68,12 +68,12 @@ public sealed class LogTailTests : IDisposable
|
||||
[Fact]
|
||||
public void Bei_gleichem_Zeitstempel_bleibt_die_bisherige_Ordnung()
|
||||
{
|
||||
// Stabil sortiert: Zwei Zeilen derselben Millisekunde dürfen nicht die Plätze
|
||||
// tauschen, sonst zerfällt ein zusammenhängender Ablauf innerhalb eines Moduls.
|
||||
// Sorted stably: two lines of the same millisecond must not swap
|
||||
// places, otherwise a coherent sequence within a module falls apart.
|
||||
//
|
||||
// Über Moduldateien hinweg entscheidet dann der Modulname — "Alpha" vor "Beta".
|
||||
// Directory.GetFiles liefert unter Linux die Verzeichnisreihenfolge; ohne die
|
||||
// Sortierung in ReadNew stünde hier von Lauf zu Lauf etwas anderes.
|
||||
// Across module files the module name then decides — "Alpha" before "Beta".
|
||||
// Directory.GetFiles returns the directory order under Linux; without the
|
||||
// sorting in ReadNew something different would stand here from run to run.
|
||||
Write("Alpha", "[10:00:00.000] [INF] alpha eins", "[10:00:00.000] [INF] alpha zwei");
|
||||
Write("Beta", "[10:00:00.000] [INF] beta eins");
|
||||
|
||||
@@ -89,8 +89,8 @@ public sealed class LogTailTests : IDisposable
|
||||
[Fact]
|
||||
public void Ein_Stacktrace_bleibt_bei_seiner_Meldung()
|
||||
{
|
||||
// Eine Ausnahme hängt ihre Zeilen ohne eigenen Zeitstempel unter die Meldung.
|
||||
// Ohne Sonderbehandlung wären sie ohne Schlüssel nach ganz vorn gerutscht.
|
||||
// An exception hangs its lines without their own timestamp below the message.
|
||||
// Without special handling they would have slipped to the very front without a key.
|
||||
Write("Alpha", "[10:00:00.500] [INF] danach");
|
||||
Write("Engine",
|
||||
"[10:00:00.100] [ERR] Aufruf fehlgeschlagen",
|
||||
@@ -110,9 +110,9 @@ public sealed class LogTailTests : IDisposable
|
||||
[Fact]
|
||||
public void Ein_Stacktrace_bleibt_auch_ueber_die_Taktgrenze_bei_seiner_Meldung()
|
||||
{
|
||||
// Der Takt kann mitten in einem Eintrag enden: Die Meldung ist gelesen, die
|
||||
// Fortsetzung kommt erst beim nächsten Aufruf. Der Zeitstempel muss dann aus
|
||||
// dem vorigen Takt weitergetragen werden.
|
||||
// The tick can end in the middle of an entry: the message has been read, the
|
||||
// continuation only comes with the next call. The timestamp must then be carried over from
|
||||
// the previous tick.
|
||||
var tail = Tail();
|
||||
|
||||
Write("Engine", "[10:00:00.100] [ERR] Aufruf fehlgeschlagen");
|
||||
@@ -132,7 +132,7 @@ public sealed class LogTailTests : IDisposable
|
||||
[Fact]
|
||||
public void Eine_Uhrzeit_mitten_in_der_Meldung_ist_kein_Sortierschluessel()
|
||||
{
|
||||
// Gesucht wird der Zeitstempel am Zeilenanfang, nicht irgendeine Uhrzeit im Text.
|
||||
// What is looked for is the timestamp at the start of the line, not any time in the text.
|
||||
Write("Alpha", "[10:00:00.100] [INF] naechster Lauf um [23:59:59.999]");
|
||||
Write("Beta", "[10:00:00.200] [INF] danach");
|
||||
|
||||
@@ -145,7 +145,7 @@ public sealed class LogTailTests : IDisposable
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// Was die Sortierung nicht kaputtmachen darf
|
||||
// What the sorting must not break
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
[Fact]
|
||||
@@ -174,9 +174,9 @@ public sealed class LogTailTests : IDisposable
|
||||
[Fact]
|
||||
public void Eine_weggefilterte_Zeile_traegt_ihren_Zeitstempel_trotzdem_weiter()
|
||||
{
|
||||
// Der Stufenfilter darf die Zuordnung der Fortsetzungszeilen nicht verlieren:
|
||||
// Die Meldung fällt weg, ihr Stacktrace nicht — er hat keine eigene Stufe und
|
||||
// wird bewusst durchgelassen. Er muss dann an ihrer Stelle stehen.
|
||||
// The level filter must not lose the assignment of the continuation lines:
|
||||
// the message drops out, its stack trace does not — it has no level of its own and
|
||||
// is deliberately let through. It must then stand in the message's place.
|
||||
Write("Alpha", "[10:00:00.500] [ERR] spaeter Fehler");
|
||||
Write("Engine",
|
||||
"[10:00:00.100] [INF] harmlos",
|
||||
|
||||
Reference in New Issue
Block a user