fix: Recherche-Export zeigt "Analyse" statt "Lagebild" als Sektions-Ueberschrift
Bei Incidents vom Typ research wird in PDF und DOCX nun korrekt "Analyse" statt "Lagebild" als Ueberschrift verwendet. Fallback-Texte auf neutrale Formulierung geaendert. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -96,7 +96,7 @@ def _prepare_timeline(articles: list) -> list:
|
|||||||
def _markdown_to_html(text: str) -> str:
|
def _markdown_to_html(text: str) -> str:
|
||||||
"""Einfache Markdown -> HTML Konvertierung für Lagebild."""
|
"""Einfache Markdown -> HTML Konvertierung für Lagebild."""
|
||||||
if not text:
|
if not text:
|
||||||
return "<p><em>Kein Lagebild verfügbar.</em></p>"
|
return "<p><em>Keine Zusammenfassung verfügbar.</em></p>"
|
||||||
# Basic Markdown -> HTML
|
# Basic Markdown -> HTML
|
||||||
html = text
|
html = text
|
||||||
# Headlines
|
# Headlines
|
||||||
@@ -155,7 +155,7 @@ def _truncate_lagebild(summary_text: str, max_chars: int = 4000) -> str:
|
|||||||
|
|
||||||
text = "\n".join(result_lines).rstrip()
|
text = "\n".join(result_lines).rstrip()
|
||||||
if len(text) < len(summary_text) - 100:
|
if len(text) < len(summary_text) - 100:
|
||||||
text += "\n\n*[Vollständiges Lagebild im Vollständigen Bericht]*"
|
text += "\n\n*[Vollständige Zusammenfassung im Vollständigen Bericht]*"
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
@@ -359,8 +359,8 @@ async def generate_docx(
|
|||||||
|
|
||||||
if scope in ("report", "full"):
|
if scope in ("report", "full"):
|
||||||
# --- Lagebild ---
|
# --- Lagebild ---
|
||||||
doc.add_heading("Lagebild", level=1)
|
doc.add_heading("Analyse" if incident.get("type") == "research" else "Lagebild", level=1)
|
||||||
raw_summary = incident.get("summary") or "Kein Lagebild verfügbar."
|
raw_summary = incident.get("summary") or "Keine Zusammenfassung verfügbar."
|
||||||
summary = _strip_citation_numbers(
|
summary = _strip_citation_numbers(
|
||||||
_truncate_lagebild(raw_summary, 4000) if scope == "report" else raw_summary
|
_truncate_lagebild(raw_summary, 4000) if scope == "report" else raw_summary
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ tr:nth-child(even) { background: #f8f9fa; }
|
|||||||
</div>
|
</div>
|
||||||
<!-- Lagebild -->
|
<!-- Lagebild -->
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Lagebild</h2>
|
<h2>{% if incident.type == "research" %}Analyse{% else %}Lagebild{% endif %}</h2>
|
||||||
{% if lagebild_timestamp %}<p style="font-size:9pt;color:#888;margin-bottom:10px;">Aktualisiert: {{ lagebild_timestamp }}</p>{% endif %}
|
{% if lagebild_timestamp %}<p style="font-size:9pt;color:#888;margin-bottom:10px;">Aktualisiert: {{ lagebild_timestamp }}</p>{% endif %}
|
||||||
<div class="lagebild-content">{{ lagebild_html | safe }}</div>
|
<div class="lagebild-content">{{ lagebild_html | safe }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
In neuem Issue referenzieren
Einen Benutzer sperren