From 9c9c5ec1c366de99ef81f9a119aa0390744f69c2 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 3 Jul 2025 14:20:34 -0400 Subject: [PATCH] fix: internationalize placeholder text in chat inputs - Add askPagePlaceholder, askAnythingPlaceholder, enterTextToSpeakPlaceholder keys - Replace hardcoded 'Ask about this page...', 'Ask anything...', 'Enter text to speak...' - All input placeholders now use translation system - Ensures consistent multilingual experience across all UI elements --- src/languages/en.js | 3 +++ src/ui.js | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 2cd5358..d449e2e 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -24,6 +24,9 @@ export const en = { // Chat UI sendButton: "Send", typePlaceholder: "Type your message...", + askPagePlaceholder: "Ask about this page...", + askAnythingPlaceholder: "Ask anything...", + enterTextToSpeakPlaceholder: "Enter text to speak...", clearChatConfirm: "Clear all conversation history?", // Modal headers diff --git a/src/ui.js b/src/ui.js index 5fda7ea..cba3d5d 100644 --- a/src/ui.js +++ b/src/ui.js @@ -274,7 +274,7 @@ export function createFullInterface(container) { chatContainer.innerHTML = `
- +
`; @@ -283,7 +283,7 @@ export function createFullInterface(container) { chatContainer.innerHTML = `
- +
`; @@ -358,7 +358,7 @@ export function createChatFeature(container) { chatDiv.innerHTML = `

AI Chat

- + `; } else { @@ -366,7 +366,7 @@ export function createChatFeature(container) { chatDiv.innerHTML = `

AI Chat

- + `; } @@ -379,7 +379,7 @@ export function createTTSFeature(container) { if (USE_CUSTOM_STYLING) { ttsDiv.innerHTML = `

Text to Speech

- +
`; @@ -387,7 +387,7 @@ export function createTTSFeature(container) { // For blog sites without custom styling - use minimal, theme-agnostic styles ttsDiv.innerHTML = `

Text to Speech

- +
`;