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.
This commit is contained in:
OlgunR
2026-02-23 09:13:12 +01:00
parent 964d508630
commit 789066a214
2 changed files with 44 additions and 18 deletions

View File

@@ -75,15 +75,15 @@ else if (!string.IsNullOrWhiteSpace(infoMessage))
}
else if (items.Count == 0)
{
<p>Keine Eintr&#228;ge vorhanden.</p>
<p>Keine Einträge vorhanden.</p>
}
else
{
<div class="band-editor">
<div class="band-controls">
<DxButton Text="Band hinzuf&#252;gen" Click="AddBand" />
<DxButton Text="Band hinzufügen" Click="AddBand" />
<DxButton Text="Layout speichern" Click="SaveLayoutAsync" Enabled="@CanSaveBandLayout" />
<DxButton Text="Band-Layout zur&#252;cksetzen" Click="ResetBandLayoutAsync" />
<DxButton Text="Layout zurücksetzen" Click="ResetLayoutAsync" />
</div>
@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&#228;ndert von", ReadOnly = true, FilterType = ColumnFilterType.Text },
new() { FieldName = nameof(CatalogReadDto.ChangedWhen), Caption = "Ge&#228;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<ProcedureOption> 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&#228;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&#246;schen fehlgeschlagen.";
errorMessage = deleted.Error ?? "Löschen fehlgeschlagen.";
e.Cancel = true;
return;
}
infoMessage = "Katalog gel&#246;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&#252;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()

View File

@@ -83,12 +83,12 @@ else if (!string.IsNullOrWhiteSpace(infoMessage))
}
else if (items.Count == 0)
{
<p>Keine Eintr&#228;ge vorhanden.</p>
<p>Keine Einträge vorhanden.</p>
}
else
{
<div class="mb-3 page-size-selector">
<span class="page-size-label">Datens&#228;tze je Seite:</span>
<span class="page-size-label">Datensätze je Seite:</span>
<DxComboBox Data="@pageSizeOptions"
TData="PageSizeOption"
TValue="int?"
@@ -101,9 +101,9 @@ else
<div class="band-editor">
<div class="band-controls">
<DxButton Text="Band hinzuf&#252;gen" Click="AddBand" />
<DxButton Text="Band hinzufügen" Click="AddBand" />
<DxButton Text="Layout speichern" Click="SaveLayoutAsync" Enabled="@CanSaveBandLayout" />
<DxButton Text="Band-Layout zur&#252;cksetzen" Click="ResetBandLayoutAsync" />
<DxButton Text="Layout zurücksetzen" Click="ResetLayoutAsync" />
</div>
@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&#252;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&#252;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&#246;schen ist aktuell noch nicht verf&#252;gbar.";
infoMessage = "Löschen ist aktuell noch nicht verfügbar.";
e.Cancel = true;
return Task.CompletedTask;
}