Skip to content

🔨 Update translations script#13968

Merged
tiangolo merged 9 commits intofastapi:masterfrom
YuriiMotov:update-translations-prompt
Sep 20, 2025
Merged

🔨 Update translations script#13968
tiangolo merged 9 commits intofastapi:masterfrom
YuriiMotov:update-translations-prompt

Conversation

@YuriiMotov
Copy link
Member

@YuriiMotov YuriiMotov commented Aug 4, 2025

  • Add the examples of how to handle code blocks to preserve the content from being translated
  • Add explicit encoding
  • Add instructions to generate fixed anchors for headers (tmp, needs more testing)
  • Apply changes from nilslindemann

YuriiMotov and others added 2 commits August 4, 2025 18:00
Otherwise it raises on my Windows, as it tries to use the system encoding, which is not utf-8.
Copy link
Contributor

@nilslindemann nilslindemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good 👍

nilslindemann added a commit to nilslindemann/fastapi that referenced this pull request Aug 5, 2025
see fastapi@da9659b

This adds anchors to headings, so that links with hashes stay in the translation.
nilslindemann added a commit to nilslindemann/fastapi that referenced this pull request Aug 5, 2025
Before, it sometimes still wrapped the translation with "```markdown" and "```". Now not anymore.

Yurii, If you agree with that change, please apply to fastapi#13968 (update-translations-prompt)
@nilslindemann
Copy link
Contributor

Hi Yurii, good addition! I tested with the recent German translations and it works great! See here (the commits from Aug 5).

@nilslindemann

This comment was marked as off-topic.

@YuriiMotov YuriiMotov marked this pull request as ready for review September 5, 2025 05:27
Copy link
Contributor

@nilslindemann nilslindemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good 👍

nilslindemann added a commit to nilslindemann/fastapi that referenced this pull request Sep 6, 2025
Let's handle these changes in another PR.

Except the modifications in the prompt, this translate.py is now in sync with the translate.py in update-translations-prompt (fastapi#13968).
@nilslindemann
Copy link
Contributor

For the records, I made two more changes to the translate.py in the other PR, in this and this commit.

Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @YuriiMotov and @nilslindemann! 🙌 🤖 🚀

@tiangolo tiangolo merged commit 4c9c3b5 into fastapi:master Sep 20, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants