(*, lang: str, path: Path)
| 49 | |
| 50 | |
| 51 | def generate_en_path(*, lang: str, path: Path) -> Path: |
| 52 | en_docs_path = Path("docs/en/docs") |
| 53 | assert not str(path).startswith(str(en_docs_path)), ( |
| 54 | f"Path must not be inside {en_docs_path}" |
| 55 | ) |
| 56 | lang_docs_path = Path(f"docs/{lang}/docs") |
| 57 | out_path = Path(str(path).replace(str(lang_docs_path), str(en_docs_path))) |
| 58 | return out_path |
| 59 | |
| 60 | |
| 61 | def get_prompt( |