i18n: localize 3 placeholders that stayed in German under English
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) <noreply@anthropic.com>
This commit is contained in:
parent
97ea32a08b
commit
7a6654097f
@ -437,7 +437,9 @@ const UI_TEXT_DE = {
|
|||||||
formatTemplate: '(benutzerdefiniert)',
|
formatTemplate: '(benutzerdefiniert)',
|
||||||
templateEmpty: 'Das Template darf im benutzerdefinierten Modus nicht leer sein.',
|
templateEmpty: 'Das Template darf im benutzerdefinierten Modus nicht leer sein.',
|
||||||
templatePlaceholder: '{date}_{part}.mp4',
|
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: {
|
cutter: {
|
||||||
videoInfoFailed: 'Konnte Video-Informationen nicht lesen. FFprobe installiert?',
|
videoInfoFailed: 'Konnte Video-Informationen nicht lesen. FFprobe installiert?',
|
||||||
@ -452,7 +454,8 @@ const UI_TEXT_DE = {
|
|||||||
infoFps: 'FPS',
|
infoFps: 'FPS',
|
||||||
infoSelection: 'Auswahl',
|
infoSelection: 'Auswahl',
|
||||||
startLabel: 'Start:',
|
startLabel: 'Start:',
|
||||||
endLabel: 'Ende:'
|
endLabel: 'Ende:',
|
||||||
|
filePathPlaceholder: 'Keine Datei ausgewaehlt...'
|
||||||
},
|
},
|
||||||
merge: {
|
merge: {
|
||||||
empty: 'Keine Videos ausgewahlt',
|
empty: 'Keine Videos ausgewahlt',
|
||||||
|
|||||||
@ -437,7 +437,9 @@ const UI_TEXT_EN = {
|
|||||||
formatTemplate: '(custom template)',
|
formatTemplate: '(custom template)',
|
||||||
templateEmpty: 'Template cannot be empty in custom template mode.',
|
templateEmpty: 'Template cannot be empty in custom template mode.',
|
||||||
templatePlaceholder: '{date}_{part}.mp4',
|
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: {
|
cutter: {
|
||||||
videoInfoFailed: 'Could not read video info. Is FFprobe installed?',
|
videoInfoFailed: 'Could not read video info. Is FFprobe installed?',
|
||||||
@ -452,7 +454,8 @@ const UI_TEXT_EN = {
|
|||||||
infoFps: 'FPS',
|
infoFps: 'FPS',
|
||||||
infoSelection: 'Selection',
|
infoSelection: 'Selection',
|
||||||
startLabel: 'Start:',
|
startLabel: 'Start:',
|
||||||
endLabel: 'End:'
|
endLabel: 'End:',
|
||||||
|
filePathPlaceholder: 'No file selected...'
|
||||||
},
|
},
|
||||||
merge: {
|
merge: {
|
||||||
empty: 'No videos selected',
|
empty: 'No videos selected',
|
||||||
|
|||||||
@ -110,6 +110,9 @@ function applyLanguageToStaticUI(): void {
|
|||||||
setText('clipDialogPartHint', UI_TEXT.clips.dialogPartHint);
|
setText('clipDialogPartHint', UI_TEXT.clips.dialogPartHint);
|
||||||
setText('clipDialogFormatLabel', UI_TEXT.clips.dialogFormatLabel);
|
setText('clipDialogFormatLabel', UI_TEXT.clips.dialogFormatLabel);
|
||||||
setText('clipDialogConfirmBtn', UI_TEXT.clips.dialogConfirm);
|
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('cutterSelectTitle', UI_TEXT.static.cutterSelectTitle);
|
||||||
setText('cutterBrowseBtn', UI_TEXT.static.cutterBrowse);
|
setText('cutterBrowseBtn', UI_TEXT.static.cutterBrowse);
|
||||||
setText('cutterInfoDurationLabel', UI_TEXT.cutter.infoDuration);
|
setText('cutterInfoDurationLabel', UI_TEXT.cutter.infoDuration);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user