(language_code: str)
| 19 | |
| 20 | |
| 21 | def load_index_json(language_code: str) -> dict: |
| 22 | index_file = Path(f"../tutorials/learnpython.org/{language_code}/index.json") |
| 23 | if not index_file.exists(): |
| 24 | logger.error(f"index.json not found for language {language_code}") |
| 25 | return {} |
| 26 | with open(index_file, "r", encoding="utf-8") as f: |
| 27 | return json.load(f) |
| 28 | |
| 29 | |
| 30 | async def translate_welcome_md(base_file_path: str, output_file_path: str, language_code: str) -> Optional[str]: |
no test coverage detected