From 789066a21498ea98c14924e00b4392b9d8c9e626 Mon Sep 17 00:00:00 2001 From: OlgunR Date: Mon, 23 Feb 2026 09:13:12 +0100 Subject: [PATCH] Replace HTML entities with Latin-1 bytes in UI strings Replaced HTML-encoded German special characters with their Windows-1252 (Latin-1) encoded byte equivalents in user-facing strings in CatalogsGrid.razor and MassDataGrid.razor. Renamed and expanded the reset layout method for improved layout reset behavior. Updated button labels and info messages for consistency. These changes address encoding and rendering issues by shifting from HTML entities to direct byte encoding. --- .../Components/CatalogsGrid.razor | 33 +++++++++++++------ .../Components/MassDataGrid.razor | 29 +++++++++++----- 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/DbFirst.BlazorWebApp/Components/CatalogsGrid.razor b/DbFirst.BlazorWebApp/Components/CatalogsGrid.razor index 775b97d..4d80d45 100644 --- a/DbFirst.BlazorWebApp/Components/CatalogsGrid.razor +++ b/DbFirst.BlazorWebApp/Components/CatalogsGrid.razor @@ -75,15 +75,15 @@ else if (!string.IsNullOrWhiteSpace(infoMessage)) } else if (items.Count == 0) { -

Keine Einträge vorhanden.

+

Keine Einträge vorhanden.

} else {
- + - +
@foreach (var band in bandLayout.Bands) { @@ -211,8 +211,8 @@ else new() { FieldName = nameof(CatalogReadDto.CatString), Caption = "String", FilterType = ColumnFilterType.Text }, new() { FieldName = nameof(CatalogReadDto.AddedWho), Caption = "Angelegt von", ReadOnly = true, FilterType = ColumnFilterType.Text }, new() { FieldName = nameof(CatalogReadDto.AddedWhen), Caption = "Angelegt am", ReadOnly = true, FilterType = ColumnFilterType.Date }, - new() { FieldName = nameof(CatalogReadDto.ChangedWho), Caption = "Geändert von", ReadOnly = true, FilterType = ColumnFilterType.Text }, - new() { FieldName = nameof(CatalogReadDto.ChangedWhen), Caption = "Geändert am", ReadOnly = true, FilterType = ColumnFilterType.Date } + new() { FieldName = nameof(CatalogReadDto.ChangedWho), Caption = "Geändert von", ReadOnly = true, FilterType = ColumnFilterType.Text }, + new() { FieldName = nameof(CatalogReadDto.ChangedWhen), Caption = "Geändert am", ReadOnly = true, FilterType = ColumnFilterType.Date } }; private readonly List procedureOptions = new() @@ -434,7 +434,7 @@ else if (editModel.UpdateProcedure == 0 && !string.Equals(editModel.CatTitle, editModel.OriginalCatTitle, StringComparison.OrdinalIgnoreCase)) { - AddValidationError(editModel, nameof(CatalogEditModel.CatTitle), "Titel kann nicht geändert werden."); + AddValidationError(editModel, nameof(CatalogEditModel.CatTitle), "Titel kann nicht geändert werden."); return false; } @@ -453,12 +453,12 @@ else var deleted = await Api.DeleteAsync(item.Guid); if (!deleted.Success) { - errorMessage = deleted.Error ?? "Löschen fehlgeschlagen."; + errorMessage = deleted.Error ?? "Löschen fehlgeschlagen."; e.Cancel = true; return; } - infoMessage = "Katalog gelöscht."; + infoMessage = "Katalog gelöscht."; await LoadCatalogs(); } catch (Exception ex) @@ -557,7 +557,7 @@ else UpdateBandOptions(); } - private async Task ResetBandLayoutAsync() + private async Task ResetLayoutAsync() { if (string.IsNullOrWhiteSpace(layoutUser)) { @@ -565,10 +565,23 @@ else } await LayoutApi.DeleteAsync(LayoutType, LayoutKey, layoutUser); + bandLayout = new BandLayout(); columnBandAssignments.Clear(); UpdateBandOptions(); - infoMessage = "Band-Layout zurückgesetzt."; + + foreach (var column in columnDefinitions) + column.Width = null; + columnLookup = columnDefinitions.ToDictionary(c => c.FieldName, StringComparer.OrdinalIgnoreCase); + + _sizeMode = DevExpress.Blazor.SizeMode.Medium; + + if (gridRef != null) + gridRef.LoadLayout(new GridPersistentLayout()); + gridLayoutApplied = false; + + infoMessage = "Layout zur\u00fcckgesetzt."; + errorMessage = null; } private void ApplyColumnLayoutFromStorage() diff --git a/DbFirst.BlazorWebApp/Components/MassDataGrid.razor b/DbFirst.BlazorWebApp/Components/MassDataGrid.razor index 2424785..c31fad2 100644 --- a/DbFirst.BlazorWebApp/Components/MassDataGrid.razor +++ b/DbFirst.BlazorWebApp/Components/MassDataGrid.razor @@ -83,12 +83,12 @@ else if (!string.IsNullOrWhiteSpace(infoMessage)) } else if (items.Count == 0) { -

Keine Einträge vorhanden.

+

Keine Einträge vorhanden.

} else {
- Datensätze je Seite: + Datensätze je Seite:
- + - +
@foreach (var band in bandLayout.Bands) { @@ -422,7 +422,7 @@ else bandLayout.SizeMode = _sizeMode; } - private async Task ResetBandLayoutAsync() + private async Task ResetLayoutAsync() { if (string.IsNullOrWhiteSpace(layoutUser)) { @@ -430,10 +430,23 @@ else } await LayoutApi.DeleteAsync(LayoutType, LayoutKey, layoutUser); + bandLayout = new BandLayout(); columnBandAssignments.Clear(); UpdateBandOptions(); - infoMessage = "Band-Layout zurückgesetzt."; + + foreach (var column in columnDefinitions) + column.Width = null; + columnLookup = columnDefinitions.ToDictionary(c => c.FieldName, StringComparer.OrdinalIgnoreCase); + + _sizeMode = DevExpress.Blazor.SizeMode.Medium; + + if (gridRef != null) + gridRef.LoadLayout(new GridPersistentLayout()); + gridLayoutApplied = false; + + infoMessage = "Layout zur\u00fcckgesetzt."; + errorMessage = null; } private void ApplyColumnLayoutFromStorage() @@ -694,7 +707,7 @@ else var editModel = (MassDataEditModel)e.EditModel; if (!decimal.TryParse(editModel.AmountText, out var amount)) { - AddValidationError(editModel, nameof(MassDataEditModel.AmountText), "Amount ist ungültig."); + AddValidationError(editModel, nameof(MassDataEditModel.AmountText), "Amount ist ungültig."); e.Cancel = true; return; } @@ -747,7 +760,7 @@ else private Task OnDataItemDeleting(GridDataItemDeletingEventArgs e) { errorMessage = null; - infoMessage = "Löschen ist aktuell noch nicht verfügbar."; + infoMessage = "Löschen ist aktuell noch nicht verfügbar."; e.Cancel = true; return Task.CompletedTask; }