From: Sebastián Ramírez Date: Mon, 10 May 2021 07:15:39 +0000 (+0200) Subject: 🐛 Fix docs script to generate a new translation language with overrides boilerplate... X-Git-Tag: 0.65.0~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=273b2cd6462ef8c3baa38997bb13f5fe4f15c892;p=thirdparty%2Ffastapi%2Ffastapi.git 🐛 Fix docs script to generate a new translation language with overrides boilerplate (#3202) --- diff --git a/scripts/docs.py b/scripts/docs.py index ec3ad76e65..40569e193d 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -106,6 +106,9 @@ def new_lang(lang: str = typer.Argument(..., callback=lang_callback)): en_index_content = en_index_path.read_text(encoding="utf-8") new_index_content = f"{missing_translation_snippet}\n\n{en_index_content}" new_index_path.write_text(new_index_content, encoding="utf-8") + new_overrides_gitignore_path = new_path / "overrides" / ".gitignore" + new_overrides_gitignore_path.parent.mkdir(parents=True, exist_ok=True) + new_overrides_gitignore_path.write_text("") typer.secho(f"Successfully initialized: {new_path}", color=typer.colors.GREEN) update_languages(lang=None)