generate_lang_path() — fastapi Function Reference
Architecture documentation for the generate_lang_path() function in translate.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9["generate_lang_path()"] 6dda5e35_b655_8af3_cd89_8c1584a092c4["translate.py"] 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 -->|defined in| 6dda5e35_b655_8af3_cd89_8c1584a092c4 fde1dac0_2ec7_f895_3237_c5b8350a5417["translate_page()"] fde1dac0_2ec7_f895_3237_c5b8350a5417 -->|calls| 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 a668556d_47cb_523f_1e1d_60be6b0d8519["translate_lang()"] a668556d_47cb_523f_1e1d_60be6b0d8519 -->|calls| 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 352a3f05_1774_2335_4f6a_d2183182663e["list_missing()"] 352a3f05_1774_2335_4f6a_d2183182663e -->|calls| 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 eb35a9a2_2f96_3d51_2678_3143960195b2["list_outdated()"] eb35a9a2_2f96_3d51_2678_3143960195b2 -->|calls| 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 style 08ab58ed_fb84_c0ad_0e2e_b521607ca3c9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/translate.py lines 40–47
def generate_lang_path(*, lang: str, path: Path) -> Path:
en_docs_path = Path("docs/en/docs")
assert str(path).startswith(str(en_docs_path)), (
f"Path must be inside {en_docs_path}"
)
lang_docs_path = Path(f"docs/{lang}/docs")
out_path = Path(str(path).replace(str(en_docs_path), str(lang_docs_path)))
return out_path
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does generate_lang_path() do?
generate_lang_path() is a function in the fastapi codebase, defined in scripts/translate.py.
Where is generate_lang_path() defined?
generate_lang_path() is defined in scripts/translate.py at line 40.
What calls generate_lang_path()?
generate_lang_path() is called by 4 function(s): list_missing, list_outdated, translate_lang, translate_page.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free