🔨 Add script for checking outdated translations#11864
🔨 Add script for checking outdated translations#11864lucasbalieiro wants to merge 7 commits intofastapi:masterfrom lucasbalieiro:master
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. |
nazarepiedady
left a comment
There was a problem hiding this comment.
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_codeargument to specify the language of the translations.tabulatelibrary.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.