Browse Source

Add link to English version. Use modern syntax for details block

pull/14809/head
Yurii Motov 5 months ago
parent
commit
4a6d8f4186
  1. 1
      docs/en/mkdocs.yml
  2. 12
      docs/en/translation-banner.md
  3. 12
      docs/ru/translation-banner.md
  4. 2
      scripts/mkdocs_hooks.py

1
docs/en/mkdocs.yml

@ -294,7 +294,6 @@ markdown_extensions:
- info - info
- check - check
pymdownx.blocks.details: null pymdownx.blocks.details: null
pymdownx.details: null
pymdownx.blocks.tab: pymdownx.blocks.tab:
alternate_style: true alternate_style: true
mdx_include: null mdx_include: null

12
docs/en/translation-banner.md

@ -1,7 +1,11 @@
??? note "🌐 Translation by AI and humans" /// details | 🌐 Translation by AI and humans
This translation was made by AI guided by humans. 🤝 This translation was made by AI guided by humans. 🤝
It could have mistakes of misunderstanding the original meaning, or looking unnatural, etc. 🤖 It could have mistakes of misunderstanding the original meaning, or looking unnatural, etc. 🤖
You can improve this translation by [helping us guide the AI LLM better](https://fastapi.tiangolo.com/contributing/#translations). You can improve this translation by [helping us guide the AI LLM better](https://fastapi.tiangolo.com/contributing/#translations).
[English version](ENGLISH_VERSION_URL)
///

12
docs/ru/translation-banner.md

@ -1,7 +1,11 @@
??? note "🌐 Перевод выполнен с помощью ИИ и людей" /// details | 🌐 Перевод выполнен с помощью ИИ и людей
Этот перевод был сделан ИИ под руководством людей. 🤝 Этот перевод был сделан ИИ под руководством людей. 🤝
В нем могут быть ошибки из-за неправильного понимания оригинального смысла или неестественности и т. д. 🤖 В нем могут быть ошибки из-за неправильного понимания оригинального смысла или неестественности и т. д. 🤖
Вы можете улучшить этот перевод, [помогая нам лучше направлять ИИ LLM](https://fastapi.tiangolo.com/contributing/#translations). Вы можете улучшить этот перевод, [помогая нам лучше направлять ИИ LLM](https://fastapi.tiangolo.com/contributing/#translations).
[Английская версия](ENGLISH_VERSION_URL)
///

2
scripts/mkdocs_hooks.py

@ -171,6 +171,8 @@ def on_page_markdown(
# For translated pages add translation banner # For translated pages add translation banner
translation_banner_content = get_translation_banner_content(config.docs_dir) translation_banner_content = get_translation_banner_content(config.docs_dir)
en_url = "https://fastapi.tiangolo.com/" + page.url.lstrip("/")
translation_banner_content = translation_banner_content.replace("ENGLISH_VERSION_URL", en_url)
header = "" header = ""
body = markdown body = markdown
if markdown.startswith("#"): if markdown.startswith("#"):

Loading…
Cancel
Save