Browse Source

Intermezzo: Add a rule to the general prompt

..., which tells the LLM to fix wrongly translated anchor parts in links.

Back in those days I translated these parts, to link to the correct German heading, which then had a different anchor than the English heading. But now, as we use the same anchors
documentation-wide, this needs to be undone. The LLM missed some of these translated anchors, so I added this rule.

I will check via script, when gone through the whole documentation, if all those anchor parts are in sync and valid.
pull/14015/head
Nils Lindemann 2 weeks ago
parent
commit
bb862baba6
  1. 16
      scripts/translate.py

16
scripts/translate.py

@ -181,6 +181,22 @@ Result (German):
5) Do not translate anchor fragments in links (the part after #), as they must remain the same to work correctly. 5) Do not translate anchor fragments in links (the part after #), as they must remain the same to work correctly.
5.1) If an existing translation has a link with an anchor fragment different to the anchor fragment in the English source, then this is an error. Fix this by using the anchor fragment of the English source.
Example:
Source (English):
[Body - Multiple Parameters: Singular values in body](body-multiple-params.md#singular-values-in-body){.internal-link target=_blank}
Existing wrong translation (German) notice the wrongly translated anchor fragment:
[Body Mehrere Parameter: Einfache Werte im Body](body-multiple-params.md#einzelne-werte-im-body){.internal-link target=_blank}.
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}.
""" """
app = typer.Typer() app = typer.Typer()

Loading…
Cancel
Save