diff --git a/src/alerts/UnexpectedErrorAlert.tsx b/src/alerts/UnexpectedErrorAlert.tsx index 7ff563c3..e5832e2e 100644 --- a/src/alerts/UnexpectedErrorAlert.tsx +++ b/src/alerts/UnexpectedErrorAlert.tsx @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright (c) 2022-2023 The Pybricks Authors +// Copyright (c) 2022-2026 The Pybricks Authors import './UnexpectedErrorAlert.scss'; import { @@ -29,7 +29,11 @@ const UnexpectedErrorAlert: React.FunctionComponent = return ( <> -

{i18n.translate('message')}

+

+ {i18n.translate('message', { + copyErrorMessage: i18n.translate('copyErrorMessage'), + })} +

{error.message}

{error.stack && ( <> diff --git a/src/alerts/translations/en.json b/src/alerts/translations/en.json index b348134d..fda28ba6 100644 --- a/src/alerts/translations/en.json +++ b/src/alerts/translations/en.json @@ -1,5 +1,5 @@ { - "message": "An unexpected error occurred. Please consider reporting this so we can make a better error message.", + "message": "An unexpected error occurred. Please consider reporting this so we can make a better error message. Click the {copyErrorMessage} button below to copy the technical details and paste it in the bug report. Also include the operating system you are using, the web browser you are using and the actions you performed that led to this error.", "technicalInfo": "Expand for detailed technical information", "copyErrorMessage": "Copy Error Message", "reportBug": "Report Bug"