Skip to content

Commit b7ea2c5

Browse files
committed
2 parents 076aaa3 + c6033d6 commit b7ea2c5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/api/handlers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ def _log_message_callback(message_key_from_translate_module, message_content="",
105105
if log_type == 'llm_request':
106106
logger.debug("LLM Request", LogType.LLM_REQUEST, data)
107107
elif log_type == 'llm_response':
108-
logger.debug("LLM Response", LogType.LLM_RESPONSE, data)
108+
# Use INFO level to ensure translation preview works even when DEBUG_MODE=false
109+
logger.info("LLM Response", LogType.LLM_RESPONSE, data)
109110
elif log_type == 'refinement_request':
110111
# Refinement uses same log type as LLM request for UI display
111112
logger.debug("Refinement Request", LogType.LLM_REQUEST, data)
112113
elif log_type == 'refinement_response':
113114
# Refinement uses same log type as LLM response for UI display
114-
logger.debug("Refinement Response", LogType.LLM_RESPONSE, data)
115+
# Use INFO level to ensure translation preview works even when DEBUG_MODE=false
116+
logger.info("Refinement Response", LogType.LLM_RESPONSE, data)
115117
elif log_type == 'progress':
116118
logger.info("Progress Update", LogType.PROGRESS, data)
117119
else:

src/core/epub/xhtml_translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ async def translate_xhtml_simplified(
10351035

10361036
# 2. Tag Preservation
10371037
# Technical protection is now always enabled
1038-
protect_technical = True
1038+
protect_technical = False
10391039

10401040
if log_callback:
10411041
log_callback("technical_protection_auto",

src/web/templates/translation_interface.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ <h3 id="openrouterTokens" style="color: #1e40af;">0</h3>
585585
</div>
586586

587587
<!-- Last Translation Preview -->
588-
<div style="margin-top: 20px;">
588+
<div id="lastTranslationPreviewSection" style="margin-top: 20px; display: block !important;">
589589
<h4 style="margin: 0 0 10px 0; color: var(--text-dark); font-weight: 700;">
590590
<span class="material-symbols-outlined" style="vertical-align: middle; font-size: 1.25rem;">description</span>
591591
Last Translation Preview

0 commit comments

Comments
 (0)