+
)
diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json
index 4f05224..b0e8f35 100644
--- a/client/src/i18n/locales/de.json
+++ b/client/src/i18n/locales/de.json
@@ -117,6 +117,7 @@
"sign_crew": "Crew-Unterschrift",
"sign_hint": "Mit Finger, Stift oder Maus unterschreiben",
"sign_clear": "Löschen",
+ "sign_export_image": "[Unterschrift]",
"no_entries": "Keine Logbucheinträge für diese Yacht gefunden. Erstellen Sie Ihren ersten Reisetag!",
"back_to_list": "Zurück zur Journal-Liste",
"save": "Logbuchseite speichern",
diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json
index 9edfc84..1a232d8 100644
--- a/client/src/i18n/locales/en.json
+++ b/client/src/i18n/locales/en.json
@@ -117,6 +117,7 @@
"sign_crew": "Crew signature",
"sign_hint": "Sign with finger, stylus, or mouse",
"sign_clear": "Clear",
+ "sign_export_image": "[Signature]",
"no_entries": "No logbook entries found for this yacht. Create your first travel day to begin!",
"back_to_list": "Back to Journal List",
"save": "Save Logbook Page",
diff --git a/client/src/services/csvExport.ts b/client/src/services/csvExport.ts
index deacbfa..2bb8ef5 100644
--- a/client/src/services/csvExport.ts
+++ b/client/src/services/csvExport.ts
@@ -3,6 +3,7 @@ import { getActiveMasterKey } from './auth.js'
import { getLogbookKey } from './logbookKeys.js'
import { decryptJson } from './crypto.js'
import { formatSignatureForExport } from '../utils/signatures.js'
+import i18n from '../i18n/index.js'
function escapeCsvValue(val: string | number | undefined | null): string {
if (val === null || val === undefined) return '';
@@ -89,14 +90,15 @@ export async function exportLogbookToCsv(logbookId: string, preloadedData?: { ya
];
const rows: string[][] = [headers];
+ const signaturePlaceholder = i18n.t('logs.sign_export_image');
for (const entry of decryptedEntries) {
const dateVal = entry.date || '';
const travelDay = entry.dayOfTravel || '';
const dep = entry.departure || '';
const dest = entry.destination || '';
- const signS = formatSignatureForExport(entry.signSkipper);
- const signC = formatSignatureForExport(entry.signCrew);
+ const signS = formatSignatureForExport(entry.signSkipper, signaturePlaceholder);
+ const signC = formatSignatureForExport(entry.signCrew, signaturePlaceholder);
const trackDist = entry.trackDistanceNm ?? '';
const trackMax = entry.trackSpeedMaxKn ?? '';
const trackAvg = entry.trackSpeedAvgKn ?? '';
diff --git a/client/src/utils/signatures.ts b/client/src/utils/signatures.ts
index 0bb3454..ff8a44b 100644
--- a/client/src/utils/signatures.ts
+++ b/client/src/utils/signatures.ts
@@ -2,8 +2,11 @@ export function isSignatureImage(value: string | undefined | null): boolean {
return typeof value === 'string' && value.startsWith('data:image/')
}
-export function formatSignatureForExport(value: string | undefined | null): string {
+export function formatSignatureForExport(
+ value: string | undefined | null,
+ imagePlaceholder: string
+): string {
if (!value) return ''
- if (isSignatureImage(value)) return '[Unterschrift]'
+ if (isSignatureImage(value)) return imagePlaceholder
return value
}