appendix: 23 Code-Ausschnitte aus dem Houston-Repository

Pin nixpkgs to the revision used by itc.componentware: the channel version
ships a latexminted that crashes on Python 3.14, which made every listing
fail and sent latexmk into an endless error prompt. Also force
nonstopmode/halt-on-error so a broken listing can never loop again.
This commit is contained in:
2026-08-25 21:38:22 +02:00
parent cd3a3e5246
commit bff34658b8
26 changed files with 1101 additions and 20 deletions
+42
View File
@@ -0,0 +1,42 @@
using System.Globalization;
using Houston.Resources;
namespace Houston.Model.Documents;
public enum DocumentType
{
ServiceProtocol,
AcceptanceDocuments,
SlaReportsTicketProcessing,
MonitoringReports,
SecurityAssessments,
BillingData,
ContractDocuments,
}
public static class DocumentTypeExtensions
{
public const string OtherDocumentsDisplayName = "Sonstige Dokumente";
public const string OtherDocumentsValue = "OtherDocuments";
public static string? FromStorageFolderName(string storageFolderName) =>
APITranslation.ResourceManager.GetString(storageFolderName, CultureInfo.InvariantCulture);
public static DocumentType? ParseStorageFolderName(string storageFolderName)
{
var type = FromStorageFolderName(storageFolderName);
if (!Enum.TryParse<DocumentType>(type, ignoreCase: true, out var variant))
return null;
return variant;
}
extension(DocumentType documentType)
{
/// <summary>
/// The name of the S3 subfolder that holds documents of this type, i.e. the German translation.
/// </summary>
public string StorageFolderName =>
APITranslation.ResourceManager.GetString(documentType.ToString(), CultureInfo.InvariantCulture)
?? throw new NotImplementedException($"Missing translation for DocumentType '{documentType}'.");
}