If you create a Python file that imports and uses FastAPI, and run it with the Python from your local environment, it will use your cloned local FastAPI source code.
And if you update that local FastAPI source code when you run that Python file again, it will use the fresh version of FastAPI you just edited.
That way, you don't have to "install" your local version to be able to test every change.
Technical Details
This only happens when you install using this included requirements.txt instead of running pip install fastapi directly.
That is because inside the requirements.txt file, the local version of FastAPI is marked to be installed in "editable" mode, with the -e option.
This command generates a directory ./htmlcov/, if you open the file ./htmlcov/index.html in your browser, you can explore interactively the regions of code that are covered by the tests, and notice if there is any region missing.
Check the currently existing pull requests for your language. You can filter the pull requests by the ones with the label for your language. For example, for Spanish, the label is lang-es.
Review those pull requests, requesting changes or approving them. For the languages I don't speak, I'll wait for several others to review the translation before merging.
Check if there's a GitHub Discussion to coordinate translations for your language. You can subscribe to it, and when there's a new pull request to review, an automatic comment will be added to the discussion.
If you translate pages, add a single pull request per page translated. That will make it much easier for others to review it.
To check the 2-letter code for the language you want to translate, you can use the table List of ISO 639-1 codes.
Let's say you want to translate a page for a language that already has translations for some pages, like Spanish.
In the case of Spanish, the 2-letter code is es. So, the directory for Spanish translations is located at docs/es/.
Tip
The main ("official") language is English, located at docs/en/.
Now run the live server for the docs in Spanish:
fast →💬 Use the command "live" and pass the language code as a CLI argumentpython ./scripts/docs.py live es [INFO] Serving on http://127.0.0.1:8008 [INFO] Start watching changes [INFO] Start detecting changes
Some of these files are updated very frequently and a translation would always be behind, or they include the main content from English source files, etc.
As already mentioned above, you can use the ./scripts/docs.py with the live command to preview the results (or mkdocs serve).
Once you are done, you can also test it all as it would look online, including all the other languages.
To do that, first build all the docs:
fast →💬 Use the command "build-all", this will take a bitpython ./scripts/docs.py build-all Building docs for: en Building docs for: es Successfully built docs for: es
This builds all those independent MkDocs sites for each language, combines them, and generates the final output at ./site/.
Then you can serve that with the command serve:
fast →💬 Use the command "serve" after running "build-all"python ./scripts/docs.py serve Warning: this is a very simple server. For development, use mkdocs serve instead. This is here only to preview a site with translations already built. Make sure you run the build-all command first. Serving at: http://127.0.0.1:8008
Translate only the Markdown documents (.md). Do not translate the code examples at ./docs_src.
In code blocks within the Markdown document, translate comments (# a comment), but leave the rest unchanged.
Do not change anything enclosed in "``" (inline code).
In lines starting with /// translate only the text part after |. Leave the rest unchanged.
You can translate info boxes like /// warning with for example /// warning | Achtung. But do not change the word immediately after the ///, it determines the color of the info box.
Do not change the paths in links to images, code files, Markdown documents.
However, when a Markdown document is translated, the #hash-parts in links to its headings may change. Update these links if possible.
Search for such links in the translated document using the regex #[^# ].
Search in all documents already translated into your language for your-translated-document.md. For example VS Code has an option "Edit" -> "Find in Files".
When translating a document, do not "pre-translate" #hash-parts that link to headings in untranslated documents.