diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index d86f760649..3407cc7fb0 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -485,8 +485,7 @@ "try_again": "", "try_it_for_free": "", "try_premium_for_free": "", - "try_recompile_project": "", - "try_refresh_page": "", + "try_recompile_project_or_troubleshoot": "", "try_to_compile_despite_errors": "", "turn_off_link_sharing": "", "turn_on_link_sharing": "", diff --git a/services/web/frontend/js/features/pdf-preview/components/error-boundary-fallback.js b/services/web/frontend/js/features/pdf-preview/components/error-boundary-fallback.js index eb0a1dd00c..91d93c4142 100644 --- a/services/web/frontend/js/features/pdf-preview/components/error-boundary-fallback.js +++ b/services/web/frontend/js/features/pdf-preview/components/error-boundary-fallback.js @@ -1,35 +1,10 @@ import PropTypes from 'prop-types' import { Alert } from 'react-bootstrap' import { Trans, useTranslation } from 'react-i18next' -import { useState } from 'react' -import importOverleafModules from '../../../../macros/import-overleaf-module.macro' - -const [contactUsModalModules] = importOverleafModules('contactUsModal') -const ContactUsModal = contactUsModalModules?.import.default function ErrorBoundaryFallback({ type }) { const { t } = useTranslation() - const [showContactUsModal, setShowContactUsModal] = useState(false) - - function handleContactUsClick() { - setShowContactUsModal(true) - } - - function handleContactUsModalHide() { - setShowContactUsModal(false) - } - - if (!ContactUsModal) { - return ( -
- - {`${t('generic_something_went_wrong')}. ${t('please_refresh')}`} - -
- ) - } - // we create each instance of `` individually so `i18next-scanner` can detect hardcoded `i18nKey` values let content if (type === 'pdf') { @@ -38,8 +13,11 @@ function ErrorBoundaryFallback({ type }) {

{t('pdf_viewer_error')}

]} // eslint-disable-line react/jsx-key, jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid + i18nKey="try_recompile_project_or_troubleshoot" + components={[ + // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content + , + ]} />

@@ -50,8 +28,11 @@ function ErrorBoundaryFallback({ type }) {

{t('log_viewer_error')}

]} // eslint-disable-line react/jsx-key, jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid + i18nKey="try_recompile_project_or_troubleshoot" + components={[ + // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content + , + ]} />

@@ -62,8 +43,11 @@ function ErrorBoundaryFallback({ type }) {

{t('pdf_preview_error')}

]} // eslint-disable-line react/jsx-key, jsx-a11y/anchor-has-content, jsx-a11y/anchor-is-valid + i18nKey="try_recompile_project_or_troubleshoot" + components={[ + // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content + , + ]} />

@@ -73,10 +57,6 @@ function ErrorBoundaryFallback({ type }) { return (
{content} -
) } diff --git a/services/web/locales/en.json b/services/web/locales/en.json index b48dcdca0d..e61fe64eee 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -777,11 +777,10 @@ "open_a_file_on_the_left": "Open a file on the left", "reference_error_relink_hint": "If this error persists, try re-linking your account here:", "pdf_rendering_error": "PDF Rendering Error", - "pdf_preview_error": "There was a problem displaying the compilation results for this project. This is an internal __appName__ issue, not a problem with your LaTeX code.", - "pdf_viewer_error": "There was a problem displaying this project PDF. This is an internal __appName__ issue, not a problem with your LaTeX code.", - "log_viewer_error": "There was a problem displaying this project compilation errors and logs. This is an internal __appName__ issue, not a problem with your LaTeX code.", - "try_recompile_project": "Please try recompiling the project. If the problem persists, <0>contact us", - "try_refresh_page": "Please try refreshing this page. If the problem persists, <0>contact us.", + "pdf_preview_error": "There was a problem displaying the compilation results for this project.", + "pdf_viewer_error": "There was a problem displaying the PDF for this project.", + "log_viewer_error": "There was a problem displaying this project’s compilation errors and logs.", + "try_recompile_project_or_troubleshoot": "Please try recompiling the project from scratch, and if that doesn’t help, follow our <0>troubleshooting guide.", "something_went_wrong_rendering_pdf": "Something went wrong while rendering this PDF.", "mendeley_reference_loading_error_expired": "Mendeley token expired, please re-link your account", "zotero_reference_loading_error_expired": "Zotero token expired, please re-link your account",