From 59e4ad79cb04e55e7fadada9b029bdcde3a27671 Mon Sep 17 00:00:00 2001 From: Nils Lindemann Date: Sat, 23 Aug 2025 00:49:40 +0200 Subject: [PATCH] Intermezzo: Tell LLM to not add anchors to links As it did so once (like in the example). This is actually super smart, the anchor exists (is the LLM caching the Anchors of headings in other documents?!), but I guess this possibly creates confusion, so avoid. --- scripts/translate.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/translate.py b/scripts/translate.py index 01284835e..ad8de6591 100644 --- a/scripts/translate.py +++ b/scripts/translate.py @@ -197,6 +197,22 @@ Result (German) – you fix the anchor fragment: [Body – Mehrere Parameter: Einfache Werte im Body](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}. +5.2) Do not add anchor fragments at will, even if this makes sense. If the English source has no anchor, don't add one. + +Example: + +Source (English): + +Create a [virtual environment](../virtual-environments.md){.internal-link target=_blank} + +Wrong translation (German) – Anchor added to the URL. + +Erstelle eine [virtuelle Umgebung](../virtual-environments.md#create-a-virtual-environment){.internal-link target=_blank} + +Good translation (German) – URL stays like in the English source. + +Erstelle eine [Virtuelle Umgebung](../virtual-environments.md){.internal-link target=_blank} + """ app = typer.Typer()