diff --git a/public/js/components/footer.js b/public/js/components/footer.js index 14ff8cbf..b13cc16b 100644 --- a/public/js/components/footer.js +++ b/public/js/components/footer.js @@ -175,7 +175,7 @@ @@ -268,6 +268,10 @@ const openModal = () => { modal.classList.remove('hidden'); + // Re-apply translations to modal when opening + if (window.I18n && window.I18n.applyTranslations) { + window.I18n.applyTranslations(); + } document.getElementById('contact-name')?.focus(); }; @@ -313,7 +317,9 @@ // Disable submit button submitBtn.disabled = true; - submitBtn.textContent = 'Sending...'; + // Use translation if available, fallback to English + const sendingText = window.I18n?.translations?.contact_modal?.submitting || 'Sending...'; + submitBtn.textContent = sendingText; try { // Get CSRF token from cookie @@ -354,7 +360,9 @@ } finally { // Re-enable submit button submitBtn.disabled = false; - submitBtn.textContent = 'Send Message'; + // Use translation if available, fallback to English + const submitText = window.I18n?.translations?.contact_modal?.submit_button || 'Send Message'; + submitBtn.textContent = submitText; } }); }