diff --git a/AudioCuesheetEditor/Resources/Localization/MainLayout/de.json b/AudioCuesheetEditor/Resources/Localization/MainLayout/de.json index bec6bc09..d1b08919 100644 --- a/AudioCuesheetEditor/Resources/Localization/MainLayout/de.json +++ b/AudioCuesheetEditor/Resources/Localization/MainLayout/de.json @@ -3,7 +3,7 @@ "translations": { "About": "Über", "An error occured": "Ein Fehler ist aufgetreten!", - "An error has occured in this applciation. Please report this error with as much details as possible here. Afterwards you can reload the application.": "Es ist ein Fehler in der Anwendung aufgetreten. Bitte melden Sie diesen Fehler unter Angabe von möglichst vielen Details hier: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=. Anschließend können Sie die Anwendung neu laden.", + "An error has occured in this application. Please report this error with as much details as possible here: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=.": "Es ist ein Fehler in der Anwendung aufgetreten. Bitte melden Sie diesen Fehler unter Angabe von möglichst vielen Details hier: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=.", "Help": "Hilfe", "Undo last change": "Letzte Änderung Rückgängig machen", "Redo last change": "Letzte Änderung wiederherstellen", @@ -69,6 +69,8 @@ "Length": "Länge", "Flags": "Markierungen", "PreGap": "Vorlücke", - "PostGap": "Nachlücke" + "PostGap": "Nachlücke", + "Error details": "Fehlerdetails", + "Reload application": "Applikation neu laden" } } \ No newline at end of file diff --git a/AudioCuesheetEditor/Resources/Localization/MainLayout/en.json b/AudioCuesheetEditor/Resources/Localization/MainLayout/en.json index a3788458..c1c490d8 100644 --- a/AudioCuesheetEditor/Resources/Localization/MainLayout/en.json +++ b/AudioCuesheetEditor/Resources/Localization/MainLayout/en.json @@ -3,7 +3,7 @@ "translations": { "About": "About", "An error occured": "An error has occured!", - "An error has occured in this applciation. Please report this error with as much details as possible here. Afterwards you can reload the application.": "An error has occured in this applciation. Please report this error with as much details as possible here: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=. Afterwards you can reload the application.", + "An error has occured in this application. Please report this error with as much details as possible here: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=.": "An error has occured in this application. Please report this error with as much details as possible here: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=.", "Help": "Help", "Undo last change": "Undo last change", "Redo last change": "Redo last change", @@ -69,6 +69,8 @@ "Length": "Length", "Flags": "Flags", "PreGap": "Pregap", - "PostGap": "Postgap" + "PostGap": "Postgap", + "Error details": "Error details", + "Reload application": "Reload application" } } \ No newline at end of file diff --git a/AudioCuesheetEditor/Shared/MainLayout.razor b/AudioCuesheetEditor/Shared/MainLayout.razor index 7ee97645..00a6f2b7 100644 --- a/AudioCuesheetEditor/Shared/MainLayout.razor +++ b/AudioCuesheetEditor/Shared/MainLayout.razor @@ -170,8 +170,11 @@ along with Foobar. If not, see - @_localizer["An error occured"] - @((MarkupString)_localizer["An error has occured in this applciation. Please report this error with as much details as possible here. Afterwards you can reload the application."]) + @_localizer["An error occured"] + @((MarkupString)_localizer["An error has occured in this application. Please report this error with as much details as possible here: https://github.com/NeoCoderMatrix86/AudioCuesheetEditor/issues/new?assignees=&labels=unreviewed+bug&template=bug_report.md&title=."]) + @_localizer["Error details"] + @context + @@ -560,8 +563,7 @@ along with Foobar. If not, see { _logger.LogInformation("restartApplicationDelegate"); modalDialog.Confirmed -= restartApplicationDelegate; - await _jsRuntime.InvokeVoidAsync("removeBeforeunload"); - _navigationManager.NavigateTo(_navigationManager.Uri, true); + await ReloadApplication(); }; modalDialog.Confirmed += restartApplicationDelegate; await modalDialog.ShowModal(); @@ -844,4 +846,10 @@ along with Foobar. If not, see } return Task.CompletedTask; } + + async Task ReloadApplication() + { + await _jsRuntime.InvokeVoidAsync("removeBeforeunload"); + _navigationManager.NavigateTo(_navigationManager.Uri, true); + } } \ No newline at end of file