diff --git a/src/controllers/documents.controller.js b/src/controllers/documents.controller.js index 73596050..3eb1496d 100644 --- a/src/controllers/documents.controller.js +++ b/src/controllers/documents.controller.js @@ -114,20 +114,17 @@ async function getDocument(req, res) { if (document.translations && document.translations[lang]) { const translation = document.translations[lang]; - // TEMPORARY WORKAROUND: Use English sections (markdown structure preserved) - // The DeepL translation mangled markdown formatting, so we use English structure - // but with translated title and content - // TODO: Re-translate with proper markdown preservation settings - const sections = document.sections || []; - - // Return document with translated fields + // WORKAROUND: Don't include sections for translations + // This forces frontend to use traditional full-document view + // which displays the fully translated content_html + // Card view sections are English-only until we fix markdown translation const translatedDoc = { ...document, title: translation.title || document.title, content_html: translation.content_html || document.content_html, content_markdown: translation.content_markdown || document.content_markdown, toc: translation.toc || document.toc, - sections: sections, // Use English sections as workaround + sections: undefined, // Force traditional view (not card view) language: lang, translation_metadata: translation.metadata };