@@ -229,7 +229,7 @@ function initializeUpload() {
229229 }
230230 } catch ( error ) {
231231 console . error ( 'Error opening file dialog:' , error )
232- alert ( 'Fehler beim Öffnen des Dateiauswahl-Dialogs ')
232+ alert ( window . i18n ? window . i18n . t ( 'submit.errorFileDialog' ) : 'Error opening file dialog ')
233233 }
234234 } else {
235235 // Fallback: create temporary file input for browser mode
@@ -484,21 +484,21 @@ function initializeForm() {
484484
485485 // Validation
486486 if ( currentSourceType === 'upload' && selectedFiles . length === 0 ) {
487- alert ( 'Bitte laden Sie mindestens eine Datei hoch .')
487+ alert ( window . i18n ? window . i18n . t ( 'submit.errorNoFile' ) : 'Please upload at least one file .')
488488 return
489489 }
490490
491491 if ( currentSourceType === 'git' ) {
492492 const gitUrl = document . getElementById ( 'gitUrl' ) . value . trim ( )
493493 if ( ! gitUrl ) {
494- alert ( 'Bitte geben Sie eine Git-Repository-URL ein .')
494+ alert ( window . i18n ? window . i18n . t ( 'submit.errorNoGitUrl' ) : 'Please enter a Git repository URL .')
495495 return
496496 }
497497 }
498498
499499 // Disable submit button
500500 submitBtn . disabled = true
501- submitBtn . textContent = 'Export wird gestartet ...'
501+ submitBtn . textContent = window . i18n ? window . i18n . t ( 'submit.starting' ) : 'Starting export ...'
502502
503503 try {
504504 const formData = new FormData ( )
@@ -530,7 +530,7 @@ function initializeForm() {
530530 } else if ( selectedFormat ) {
531531 formData . append ( 'format' , selectedFormat . value )
532532 } else {
533- alert ( 'Bitte wählen Sie ein Export-Ziel aus .')
533+ alert ( window . i18n ? window . i18n . t ( 'submit.errorNoTarget' ) : 'Please select an export target .')
534534 return
535535 }
536536
@@ -557,7 +557,7 @@ function initializeForm() {
557557
558558 if ( ! response . ok ) {
559559 const error = await response . json ( )
560- throw new Error ( error . error || ' Export fehlgeschlagen' )
560+ throw new Error ( error . error || ( window . i18n ? window . i18n . t ( 'submit.errorFailed' ) : ' Export failed' ) )
561561 }
562562
563563 const result = await response . json ( )
@@ -568,7 +568,7 @@ function initializeForm() {
568568 selectedFiles = [ ]
569569 updateFileList ( )
570570 } catch ( error ) {
571- alert ( 'Fehler beim Erstellen des Exports : ' + error . message )
571+ alert ( ( window . i18n ? window . i18n . t ( 'submit.errorCreating' ) : 'Error creating export : ') + error . message )
572572 } finally {
573573 submitBtn . disabled = false
574574 submitBtn . innerHTML = `
@@ -577,7 +577,7 @@ function initializeForm() {
577577 <polyline points="7 10 12 15 17 10"></polyline>
578578 <line x1="12" y1="15" x2="12" y2="3"></line>
579579 </svg>
580- Export starten
580+ ${ window . i18n ? window . i18n . t ( 'submit.button' ) : 'Start Export' }
581581 `
582582 }
583583 } )
@@ -594,9 +594,9 @@ function showConfirmation(result) {
594594 const closeBtn = document . getElementById ( 'closeModal' )
595595
596596 details . innerHTML = `
597- <p><strong>Job-ID :</strong> ${ result . jobId } </p>
598- <p><strong>Position in Warteschlange :</strong> ${ result . queuePosition } </p>
599- <p class="success-message">Ihr Export wurde erfolgreich zur Warteschlange hinzugefügt. </p>
597+ <p><strong>${ window . i18n ? window . i18n . t ( 'modal.jobId' ) : ' Job ID' } :</strong> ${ result . jobId } </p>
598+ <p><strong>${ window . i18n ? window . i18n . t ( 'modal.queuePosition' ) : ' Position in queue' } :</strong> ${ result . queuePosition } </p>
599+ <p class="success-message">${ window . i18n ? window . i18n . t ( 'modal.successMessage' ) : 'Your export has been successfully added to the queue.' } </p>
600600 `
601601
602602 statusLink . href = `/status.html?jobId=${ result . jobId } `
0 commit comments