(*, lang: str, path: Path)
| 39 | |
| 40 | |
| 41 | def generate_lang_path(*, lang: str, path: Path) -> Path: |
| 42 | en_docs_path = Path("docs/en/docs") |
| 43 | assert str(path).startswith(str(en_docs_path)), ( |
| 44 | f"Path must be inside {en_docs_path}" |
| 45 | ) |
| 46 | lang_docs_path = Path(f"docs/{lang}/docs") |
| 47 | out_path = Path(str(path).replace(str(en_docs_path), str(lang_docs_path))) |
| 48 | return out_path |
| 49 | |
| 50 | |
| 51 | def generate_en_path(*, lang: str, path: Path) -> Path: |
no test coverage detected