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
@@ -5,18 +5,18 @@ using System.Text.Json;
namespace ClawdDotNet.Core.Deploymentcenter;
/// <summary>
/// Der gemeinsame Unterbau für alle Deploymentcenter-Module (Watchdog, Fehler-Stream,
/// Bugtracker, Token-Provisionierung).
/// The shared foundation for all Deploymentcenter modules (watchdog, error stream,
/// bug tracker, token provisioning).
///
/// <para>Alle JSON-Endpunkte antworten einheitlich mit einem Umschlag —
/// <c>{"status":"success",…}</c> bzw. <c>{"status":"error","error":{"code":…}}</c>. Der
/// <c>code</c> ist stabil und für Programme gedacht, die <c>message</c> für Menschen.
/// Diese Klasse packt den Umschlag aus und macht aus einem Fehler eine
/// <see cref="DeploymentcenterException"/> mit dem Code daran.</para>
/// <para>All JSON endpoints answer uniformly with an envelope —
/// <c>{"status":"success",…}</c> or <c>{"status":"error","error":{"code":…}}</c>. The
/// <c>code</c> is stable and meant for programs, the <c>message</c> for humans.
/// This class unpacks the envelope and turns an error into a
/// <see cref="DeploymentcenterException"/> with the code attached.</para>
///
/// <para><b>Ausnahme:</b> Die Lizenz-Endpunkte tragen diesen Umschlag bewusst
/// <em>nicht</em> — dort steht im Feld <c>status</c> der Lizenzzustand. Sie werden
/// deshalb nicht hierüber, sondern über <c>Deploymentcenter.Client</c> angesprochen.</para>
/// <para><b>Exception:</b> the license endpoints deliberately do <em>not</em> carry this envelope
/// — there the field <c>status</c> holds the license state. They are
/// therefore not addressed through this class, but through <c>Deploymentcenter.Client</c>.</para>
/// </summary>
public sealed class DeploymentcenterApi : IDisposable
{
@@ -26,20 +26,20 @@ public sealed class DeploymentcenterApi : IDisposable
private readonly bool _ownsHttp;
private readonly string _token;
/// <summary>Die Basis-URL ohne abschließenden Schrägstrich.</summary>
/// <summary>The base URL without a trailing slash.</summary>
public string BaseUrl { get; }
/// <param name="baseUrl">Basis-URL des Deploymentcenters, etwa <c>https://dc.mhdf.de</c>.</param>
/// <param name="token">Token mit den nötigen Rechten. Geht als <c>Authorization: Bearer</c> mit.</param>
/// <param name="httpClient">Nur für Tests — sonst wird ein eigener mit Zeitgrenze erstellt.</param>
/// <param name="baseUrl">Base URL of the Deploymentcenter, for example <c>https://dc.mhdf.de</c>.</param>
/// <param name="token">Token with the necessary rights. Sent as <c>Authorization: Bearer</c>.</param>
/// <param name="httpClient">Only for tests — otherwise an own one with a timeout is created.</param>
public DeploymentcenterApi(string baseUrl, string token, HttpClient? httpClient = null)
{
if (string.IsNullOrWhiteSpace(baseUrl))
throw new ArgumentException("Deploymentcenter-URL fehlt.", nameof(baseUrl));
// Über eine ungesicherte Verbindung ginge das Token im Klartext. Ausnahme ist
// nur der eigene Rechner — dort gibt es keine Strecke, auf der jemand mithören
// könnte, und eine lokale Testinstallation hat selten ein Zertifikat.
// Over an unsecured connection the token would go in plain text. The only exception is
// the own machine — there is no route there on which someone could
// listen in, and a local test installation rarely has a certificate.
if (!IsAcceptableUrl(baseUrl))
{
throw new ArgumentException(
@@ -93,8 +93,8 @@ public sealed class DeploymentcenterApi : IDisposable
JsonElement root;
try
{
// Geklont, weil das JsonDocument am Ende dieses Blocks freigegeben wird —
// ein JsonElement daraus wäre danach nicht mehr lesbar.
// Cloned because the JsonDocument is released at the end of this block —
// a JsonElement from it would no longer be readable afterwards.
using var document = JsonDocument.Parse(string.IsNullOrWhiteSpace(body) ? "{}" : body);
root = document.RootElement.Clone();
}
@@ -155,9 +155,9 @@ public sealed class DeploymentcenterApi : IDisposable
}
/// <summary>
/// Ein vom Deploymentcenter abgelehnter Aufruf. <see cref="Code"/> ist der stabile
/// Fehlercode aus dem Umschlag (<c>unauthorized</c>, <c>rate_limited</c>, …) — er ist
/// zum Auswerten gedacht, der Text nicht.
/// A call rejected by the Deploymentcenter. <see cref="Code"/> is the stable
/// error code from the envelope (<c>unauthorized</c>, <c>rate_limited</c>, …) — it is
/// meant for evaluation, the text is not.
/// </summary>
public sealed class DeploymentcenterException(string code, string message, HttpStatusCode statusCode)
: Exception($"{message} [{code}]")
@@ -166,7 +166,7 @@ public sealed class DeploymentcenterException(string code, string message, HttpS
public HttpStatusCode StatusCode { get; } = statusCode;
/// <summary>Token fehlt, ist abgelaufen oder deckt das nötige Recht nicht ab.</summary>
/// <summary>Token is missing, expired or does not cover the necessary right.</summary>
public bool IsAuthorizationProblem =>
StatusCode is HttpStatusCode.Unauthorized or HttpStatusCode.Forbidden;
}