diff --git a/Wave/Components/Pages/Error.razor b/Wave/Components/Pages/Error.razor index 576cc2d..a6d3b61 100644 --- a/Wave/Components/Pages/Error.razor +++ b/Wave/Components/Pages/Error.razor @@ -1,29 +1,20 @@ @page "/Error" @using System.Diagnostics -Error +@inject IStringLocalizer Localizer -

Error.

-

An error occurred while processing your request.

+@Localizer["Title"] -@if (ShowRequestId) -{ +

@Localizer["Title"]

+ +

@Localizer["Message"]

+ +@if (ShowRequestId) {

- Request ID: @RequestId + Request ID:@RequestId

} -

Development Mode

-

- Swapping to Development environment will display more detailed information about the error that occurred. -

-

- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -

- @code{ [CascadingParameter] private HttpContext? HttpContext { get; set; } @@ -31,6 +22,5 @@ private string? RequestId { get; set; } private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); - protected override void OnInitialized() => - RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; + protected override void OnInitialized() => RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; } diff --git a/Wave/Resources/Components/Pages/Error.de-DE.resx b/Wave/Resources/Components/Pages/Error.de-DE.resx new file mode 100644 index 0000000..c3c352f --- /dev/null +++ b/Wave/Resources/Components/Pages/Error.de-DE.resx @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Unerwarteter Fehler + + + Beim verarbeiten Ihrer Anfrage ist ein Fehler aufgetreten. + + \ No newline at end of file diff --git a/Wave/Resources/Components/Pages/Error.en-GB.resx b/Wave/Resources/Components/Pages/Error.en-GB.resx new file mode 100644 index 0000000..4fdb1b6 --- /dev/null +++ b/Wave/Resources/Components/Pages/Error.en-GB.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Wave/Resources/Components/Pages/Error.resx b/Wave/Resources/Components/Pages/Error.resx new file mode 100644 index 0000000..df29ca7 --- /dev/null +++ b/Wave/Resources/Components/Pages/Error.resx @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Unexpected Error + + + An error occurred while processing your request. + + \ No newline at end of file