-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔨 Add script for checking outdated translations #11864
base: master
Are you sure you want to change the base?
Conversation
📝 Docs preview for commit 5da4ebc at: https://c921c472.fastapitiangolo.pages.dev |
It's really a great idea @lucasbalieiro 🚀🚀 I can't review the code right now, but definitely I'll do it saturday or sunday. I don't know if @tiangolo finds it useful, but I think it can help us a lot with the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature is good and understandable. Also, the code is not too extensive, so the person who sees it will not take too long to figure it out.
Well done 👏.
I create a cli based on this PR, so we can use it until this PR gets merged 😃 |
Thanks for being so interested in contributing to FastAPI, and for the time and effort that you have taken to submit this. I think this is a great idea, thanks for the initiative! We appreciate your patience as we managed the queue 🙇🏻♀️ |
📝 Docs preview for commit 9b86c57 at: https://caee3d52.fastapitiangolo.pages.dev |
This pull request introduces a script that checks for outdated translations in documentation by comparing the last commit dates of English documents with those in a specific language.
Main Change:
./scripts/docs.py
:language_code
argument to specify the language of the translations.tabulate
library.Usage:
To use the script, run the following command from the root of the FastAPI directory:
Replace
<language_code>
with the appropriate ISO 639-1 code for the translations you want to check.Why This Script Can Be Useful:
This script provides an automated way to check for outdated translations by comparing commit dates of the English documentation with those of translated versions.
Key benefits include:
Video:
Screencast.from.18-07-2024.22.27.46.webm
Testing:
Dependencies Added to
requirements-docs.txt
:tabulate
: For formatting the output table.gitpython
: For retrieving commit information from Git repositories.Other:
This idea originated from the discussion on 🇧🇷 Portuguese translations. Special thanks to @nazarepiedady and @Joao-Pedro-P-Holanda for their valuable feedback and insights!
I hope the FastAPI community finds this tool useful, and I'm excited to contribute back to the community that has given me so much through this framework.