From d24b6fa1bb844bc58c82d2126f846a02ddc08959 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Thu, 3 Jul 2025 22:04:43 -0400 Subject: [PATCH] fix: use correct variable name targetLanguage instead of targetLanguageCode --- src/translate-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/translate-modal.js b/src/translate-modal.js index 241ba2d..87b943c 100644 --- a/src/translate-modal.js +++ b/src/translate-modal.js @@ -304,7 +304,7 @@ export function openTranslateModal() { const { preservedText } = preserveSpecialContent(contentToProcess); // Build the actual prompt that will be sent to the AI - const prompt = `Translate the following HTML content into ${SUPPORTED_LANGUAGES[targetLanguageCode]}. The input is in English and formatted as HTML, which includes formatting, code blocks, and technical content. Ensure the output preserves the structure, syntax, and formatting of the original. Do not translate or modify placeholders like __CODE_0__, __URI_0__, __HTML_0__, etc., as they represent code blocks, URLs, or HTML elements that should remain unchanged. Only translate the surrounding text. Here is the text to translate: + const prompt = `Translate the following HTML content into ${SUPPORTED_LANGUAGES[targetLanguage]}. The input is in English and formatted as HTML, which includes formatting, code blocks, and technical content. Ensure the output preserves the structure, syntax, and formatting of the original. Do not translate or modify placeholders like __CODE_0__, __URI_0__, __HTML_0__, etc., as they represent code blocks, URLs, or HTML elements that should remain unchanged. Only translate the surrounding text. Here is the text to translate: ${preservedText}`;