refactor(i18n): centralize unknownError and unify pdfToText note keys

This commit is contained in:
Sebastian Espei
2026-04-17 14:40:02 +00:00
committed by GitHub
parent 0ea7c69b25
commit b9dacf5537
5 changed files with 6 additions and 23 deletions
+1 -3
View File
@@ -758,9 +758,7 @@ async function processSignature(): Promise<void> {
hideLoader();
console.error('Signing error:', error);
const errorMessage =
error instanceof Error
? error.message
: t('tools:digitalSignPdf.unknownError');
error instanceof Error ? error.message : t('common.unknownError');
// Check if this is a CORS/network error from certificate chain fetching
if (
+1 -1
View File
@@ -216,7 +216,7 @@ async function initializePage() {
} catch (e: unknown) {
hideLoader();
const errorMessage =
e instanceof Error ? e.message : t('tools:wasmSettings.unknownError');
e instanceof Error ? e.message : t('common.unknownError');
showAlert(
t('tools:wasmSettings.errorTitle'),
t('tools:wasmSettings.failedSave', { message: errorMessage })
+2 -9
View File
@@ -131,17 +131,10 @@
>
<p class="text-amber-200 text-sm">
<strong data-i18n="tools:pdfToText.noteLabel">Note:</strong>
<span data-i18n="tools:pdfToText.notePrefix"
<span data-i18n="tools:pdfToText.noteText"
>This tool works ONLY with digitally created PDFs. For scanned
documents or image-based PDFs, use our</span
documents or image-based PDFs, use our OCR PDF tool instead.</span
>
<a
href="ocr-pdf.html"
class="text-indigo-400 hover:text-indigo-300 underline"
data-i18n="tools:ocrPdf.name"
>OCR PDF tool</a
>
<span data-i18n="tools:pdfToText.noteSuffix">instead.</span>
</p>
</div>