mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-08 00:50:59 +01:00
refactor(i18n): centralize unknownError and unify pdfToText note keys
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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 })
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user