diff --git a/src/translate-modal.js b/src/translate-modal.js index d03845e..db68c0d 100644 --- a/src/translate-modal.js +++ b/src/translate-modal.js @@ -2,7 +2,7 @@ import { initializeChunkFiveFont } from "./ui-themes.js"; import { getUIText } from "./ui-translations.js"; import { extractWebpageContent } from "./content.js"; -import { translateCurrentPage, translateText, translateHTML, SUPPORTED_LANGUAGES } from "./translation.js"; +import { translateCurrentPage, translateText, translateHTML, SUPPORTED_LANGUAGES, NATIVE_LANGUAGE_NAMES } from "./translation.js"; // Function to fetch full HTML content from a remote URL using CORS proxy async function fetchRemotePageHTML(url) { @@ -219,7 +219,9 @@ export function openTranslateModal() { Object.entries(SUPPORTED_LANGUAGES).forEach(([code, name]) => { const option = document.createElement("option"); option.value = code; - option.textContent = name; + const nativeName = NATIVE_LANGUAGE_NAMES[code]; + // Show both English and native names, unless they're the same + option.textContent = nativeName && nativeName !== name ? `${name} - ${nativeName}` : name; languageSelect.appendChild(option); });