mirror of
https://github.com/fastapi/fastapi.git
synced 2026-05-16 12:31:57 -04:00
📝 Add documentation for non-translated pages and scripts to verify them (#12020)
This commit is contained in:
committed by
GitHub
parent
75705617a6
commit
85bd4067c2
@@ -8,9 +8,13 @@ from mkdocs.structure.files import File, Files
|
||||
from mkdocs.structure.nav import Link, Navigation, Section
|
||||
from mkdocs.structure.pages import Page
|
||||
|
||||
non_traslated_sections = [
|
||||
non_translated_sections = [
|
||||
"reference/",
|
||||
"release-notes.md",
|
||||
"external-links.md",
|
||||
"newsletter.md",
|
||||
"management-tasks.md",
|
||||
"management.md",
|
||||
]
|
||||
|
||||
|
||||
@@ -128,7 +132,7 @@ def on_page_markdown(
|
||||
markdown: str, *, page: Page, config: MkDocsConfig, files: Files
|
||||
) -> str:
|
||||
if isinstance(page.file, EnFile):
|
||||
for excluded_section in non_traslated_sections:
|
||||
for excluded_section in non_translated_sections:
|
||||
if page.file.src_path.startswith(excluded_section):
|
||||
return markdown
|
||||
missing_translation_content = get_missing_translation_content(config.docs_dir)
|
||||
|
||||
Reference in New Issue
Block a user