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
@@ -9,25 +9,25 @@ using Microsoft.Extensions.Logging;
|
||||
namespace ClawdDotNet.Desktop;
|
||||
|
||||
/// <summary>
|
||||
/// Eine Instanz ohne Fenster (#528, Stufe 2).
|
||||
/// An instance without a window (#528, stage 2).
|
||||
///
|
||||
/// <para><b>Wozu, wenn doch jede Instanz ihr Fenster behält (E-M2).</b> Weil der
|
||||
/// Instanzprozess damit beweist, dass er keines <em>braucht</em>. Ein Server ohne
|
||||
/// Bildschirmsitzung, ein systemd-Dienst, ein Prüflauf im Bau — alle drei brauchen genau
|
||||
/// das, und jede versehentliche Abhängigkeit von der Oberfläche fällt hier sofort auf,
|
||||
/// statt erst auf der Zielmaschine.</para>
|
||||
/// <para><b>What for, if every instance keeps its window anyway (E-M2).</b> Because the
|
||||
/// instance process thereby proves that it does not <em>need</em> one. A server without a
|
||||
/// screen session, a systemd service, a test run in the build — all three need exactly
|
||||
/// that, and every accidental dependency on the user interface shows up here immediately,
|
||||
/// instead of only on the target machine.</para>
|
||||
///
|
||||
/// <para><b>Was hier nicht gefragt wird, wird gar nicht gefragt.</b> Ein Dienst ohne
|
||||
/// Sitzung, der beim Start ein Eingabefenster öffnet, hängt für immer, ohne dass jemand
|
||||
/// die Frage je zu sehen bekommt. Die Instanz kommt deshalb vom Argument, die Lizenz
|
||||
/// über <see cref="NonInteractiveLicensePrompt"/>, und die Telegram-Anmeldung bleibt
|
||||
/// aus — <c>Callbacks.TelegramLogin</c> ist null, und das ist hier die Antwort und kein
|
||||
/// Versäumnis.</para>
|
||||
/// <para><b>What is not asked here is not asked at all.</b> A service without a
|
||||
/// session that opens an input window at startup hangs forever without anyone
|
||||
/// ever getting to see the question. The instance therefore comes from the argument, the license
|
||||
/// via <see cref="NonInteractiveLicensePrompt"/>, and the Telegram login stays
|
||||
/// off — <c>Callbacks.TelegramLogin</c> is null, and that is the answer here, not an
|
||||
/// omission.</para>
|
||||
///
|
||||
/// <para><b>Unter Windows sieht man davon wenig.</b> Die Programmdatei ist eine
|
||||
/// <c>WinExe</c> und hat keine Konsole; die Meldungen unten landen dann im Nichts. Was
|
||||
/// zählt, steht ohnehin im Instanzprotokoll. Der Zielbetrieb ist Linux, und dort ist es
|
||||
/// eine gewöhnliche Konsolenanwendung.</para>
|
||||
/// <para><b>Under Windows you see little of it.</b> The executable is a
|
||||
/// <c>WinExe</c> and has no console; the messages below then go nowhere. What
|
||||
/// matters is in the instance log anyway. The target platform is Linux, and there it is
|
||||
/// an ordinary console application.</para>
|
||||
/// </summary>
|
||||
internal static class HeadlessRun
|
||||
{
|
||||
@@ -54,16 +54,16 @@ internal static class HeadlessRun
|
||||
{
|
||||
SelectInstance = _ => Task.FromResult<string?>(instancePath),
|
||||
|
||||
// Fragt nicht, sondern meldet, was zu tun ist. Im geführten Modus (E-M3)
|
||||
// entfällt die lokale Prüfung; der Manager prüft zentral.
|
||||
// Does not ask, but reports what to do. In managed mode (E-M3)
|
||||
// the local check is dropped; the manager checks centrally.
|
||||
License = new NonInteractiveLicensePrompt(Console.Error.WriteLine),
|
||||
IsManaged = CommandLine.IsManaged(args)
|
||||
});
|
||||
|
||||
if (host is null)
|
||||
{
|
||||
// Kein Fehlertext heisst Abbruch mit Ansage - die Lizenzabfrage hat ihre
|
||||
// Meldung schon selbst geschrieben.
|
||||
// No error text means abort with an announcement - the license prompt has already written its
|
||||
// message itself.
|
||||
if (error is not null) await Console.Error.WriteLineAsync(error);
|
||||
return ExitStartFailed;
|
||||
}
|
||||
@@ -76,9 +76,9 @@ internal static class HeadlessRun
|
||||
|
||||
if (web is null)
|
||||
{
|
||||
// Ohne Socket ist eine kopflose Instanz nicht ansprechbar - also nichts,
|
||||
// was man laufen lassen sollte. Mit Fenster waere das anders: Dort bleibt
|
||||
// die Oberflaeche als Zugang.
|
||||
// Without a socket a headless instance cannot be addressed - so nothing
|
||||
// you should let run. With a window that would be different: there the
|
||||
// user interface remains as access.
|
||||
logger.LogError("Kein Zugang: Die HTTP-Fläche ist nicht hochgekommen.");
|
||||
return ExitNoEndpoint;
|
||||
}
|
||||
@@ -100,16 +100,16 @@ internal static class HeadlessRun
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wartet, bis jemand Schluss sagt.
|
||||
/// Waits until someone says stop.
|
||||
///
|
||||
/// <para>Vier Wege, weil vier Absender in Frage kommen: die Bitte des Instanzmanagers
|
||||
/// über den Socket (der Regelfall), <c>SIGTERM</c> von systemd, <c>SIGINT</c> vom
|
||||
/// Terminal, und <see cref="AppDomain.ProcessExit"/> als letzte Gelegenheit.</para>
|
||||
/// <para>Four ways, because four senders come into question: the request of the instance manager
|
||||
/// via the socket (the normal case), <c>SIGTERM</c> from systemd, <c>SIGINT</c> from the
|
||||
/// terminal, and <see cref="AppDomain.ProcessExit"/> as the last opportunity.</para>
|
||||
///
|
||||
/// <para><b>Das Signal wird abgefangen, nicht durchgelassen</b>
|
||||
/// (<c>context.Cancel = true</c>). Sonst räumte die Laufzeit den Prozess ab, während
|
||||
/// das geordnete Herunterfahren noch läuft — und genau dabei wird der Schreibpuffer
|
||||
/// des Protokolls geleert. Ein Ende ohne diese Zeilen ist der Zustand aus #529.</para>
|
||||
/// <para><b>The signal is caught, not let through</b>
|
||||
/// (<c>context.Cancel = true</c>). Otherwise the runtime would tear down the process while
|
||||
/// the orderly shutdown is still running — and exactly then the write buffer
|
||||
/// of the log is flushed. An end without these lines is the state from #529.</para>
|
||||
/// </summary>
|
||||
private static async Task WaitForShutdownAsync(ILogger logger, InstanceControl steuerung)
|
||||
{
|
||||
@@ -121,9 +121,9 @@ internal static class HeadlessRun
|
||||
logger.LogInformation("Beendigung angefordert ({Grund}).", grund);
|
||||
}
|
||||
|
||||
// Der Instanzmanager, ueber den Socket. Der uebliche Weg, sobald es ihn gibt:
|
||||
// Er bittet, statt zu schiessen - ein Instanzprozess haelt eine offene Datenbank
|
||||
// und laufende Agenten, und beides will zu Ende gebracht werden.
|
||||
// The instance manager, via the socket. The usual way, as soon as it exists:
|
||||
// it asks instead of shooting - an instance process holds an open database
|
||||
// and running agents, and both want to be brought to an end.
|
||||
steuerung.ShutdownRequested += () => Beenden("Instanzmanager");
|
||||
|
||||
using var sigterm = PosixSignalRegistration.Create(PosixSignal.SIGTERM, context =>
|
||||
|
||||
Reference in New Issue
Block a user