From da9659b82efd8211e206e7ebae9ab29da937f728 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Tue, 5 Aug 2025 11:14:00 +0200 Subject: [PATCH] Update general prompt to generate fixed anchors for headers --- scripts/translate.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/translate.py b/scripts/translate.py index 6dfeeadf2..cd73ba277 100644 --- a/scripts/translate.py +++ b/scripts/translate.py @@ -93,6 +93,24 @@ Source: Result: /// details | Vista previa + +For **every** Markdown header (all levels), add a custom anchor based on the original English header: + +- Convert the English header to lowercase, replace spaces and punctuation with hyphens (kebab-case). +- Keep this anchor identical across all translations — do not translate it. +- Even if the original English document doesn't have an anchor, always add the correct anchor in the translated version. +- Use these fixed anchors for all internal links across languages. + +Example: + +Source (English): + +## Alternative API docs + +Result (Spanish): + +## Documentación de la API alternativa + """ app = typer.Typer()