From 7a6654097f025b53f063e22d1381d495968e3c34 Mon Sep 17 00:00:00 2001 From: xRangerDE Date: Mon, 11 May 2026 08:54:08 +0200 Subject: [PATCH] i18n: localize 3 placeholders that stayed in German under English MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three input placeholders in the HTML had hardcoded German strings that were never routed through the locale system: - clipStartPart (Clip cutter modal — "Start Part-Nummer") said "z.B. 42" regardless of language - clipUrl (Clips tab) read "...oder https://www.twitch.tv/..." with a mid-string German conjunction - cutterFilePath (Video cutter "Datei ausgewahlt" field) read "Keine Datei ausgewahlt..." even under EN Added three locale keys (clips.urlPlaceholder, clips.startPartPlaceholder, cutter.filePathPlaceholder) with DE+EN translations, plus the three setPlaceholder() wire-up calls in renderer-texts.ts. The HTML defaults stay German (consistent with the other placeholders) but the JS now overrides them when the user picks English (or re-renders when language changes). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/renderer-locale-de.ts | 7 +++++-- src/renderer-locale-en.ts | 7 +++++-- src/renderer-texts.ts | 3 +++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/renderer-locale-de.ts b/src/renderer-locale-de.ts index 990e038..4c26760 100644 --- a/src/renderer-locale-de.ts +++ b/src/renderer-locale-de.ts @@ -437,7 +437,9 @@ const UI_TEXT_DE = { formatTemplate: '(benutzerdefiniert)', templateEmpty: 'Das Template darf im benutzerdefinierten Modus nicht leer sein.', templatePlaceholder: '{date}_{part}.mp4', - templateHelp: 'Platzhalter: {title} {id} {channel} {date} {part} {part_padded} {trim_start} {trim_end} {trim_length} {date_custom="yyyy-MM-dd"}' + templateHelp: 'Platzhalter: {title} {id} {channel} {date} {part} {part_padded} {trim_start} {trim_end} {trim_length} {date_custom="yyyy-MM-dd"}', + urlPlaceholder: 'https://clips.twitch.tv/... oder https://www.twitch.tv/.../clip/...', + startPartPlaceholder: 'z.B. 42' }, cutter: { videoInfoFailed: 'Konnte Video-Informationen nicht lesen. FFprobe installiert?', @@ -452,7 +454,8 @@ const UI_TEXT_DE = { infoFps: 'FPS', infoSelection: 'Auswahl', startLabel: 'Start:', - endLabel: 'Ende:' + endLabel: 'Ende:', + filePathPlaceholder: 'Keine Datei ausgewaehlt...' }, merge: { empty: 'Keine Videos ausgewahlt', diff --git a/src/renderer-locale-en.ts b/src/renderer-locale-en.ts index 766adb8..2356fbe 100644 --- a/src/renderer-locale-en.ts +++ b/src/renderer-locale-en.ts @@ -437,7 +437,9 @@ const UI_TEXT_EN = { formatTemplate: '(custom template)', templateEmpty: 'Template cannot be empty in custom template mode.', templatePlaceholder: '{date}_{part}.mp4', - templateHelp: 'Placeholders: {title} {id} {channel} {date} {part} {part_padded} {trim_start} {trim_end} {trim_length} {date_custom="yyyy-MM-dd"}' + templateHelp: 'Placeholders: {title} {id} {channel} {date} {part} {part_padded} {trim_start} {trim_end} {trim_length} {date_custom="yyyy-MM-dd"}', + urlPlaceholder: 'https://clips.twitch.tv/... or https://www.twitch.tv/.../clip/...', + startPartPlaceholder: 'e.g. 42' }, cutter: { videoInfoFailed: 'Could not read video info. Is FFprobe installed?', @@ -452,7 +454,8 @@ const UI_TEXT_EN = { infoFps: 'FPS', infoSelection: 'Selection', startLabel: 'Start:', - endLabel: 'End:' + endLabel: 'End:', + filePathPlaceholder: 'No file selected...' }, merge: { empty: 'No videos selected', diff --git a/src/renderer-texts.ts b/src/renderer-texts.ts index 1a04ba2..48f4837 100644 --- a/src/renderer-texts.ts +++ b/src/renderer-texts.ts @@ -110,6 +110,9 @@ function applyLanguageToStaticUI(): void { setText('clipDialogPartHint', UI_TEXT.clips.dialogPartHint); setText('clipDialogFormatLabel', UI_TEXT.clips.dialogFormatLabel); setText('clipDialogConfirmBtn', UI_TEXT.clips.dialogConfirm); + setPlaceholder('clipUrl', UI_TEXT.clips.urlPlaceholder); + setPlaceholder('clipStartPart', UI_TEXT.clips.startPartPlaceholder); + setPlaceholder('cutterFilePath', UI_TEXT.cutter.filePathPlaceholder); setText('cutterSelectTitle', UI_TEXT.static.cutterSelectTitle); setText('cutterBrowseBtn', UI_TEXT.static.cutterBrowse); setText('cutterInfoDurationLabel', UI_TEXT.cutter.infoDuration);