]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔧 Temporarily disable translations still in progress, being migrated to the new LLM...
authorMotov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Wed, 17 Dec 2025 10:44:55 +0000 (11:44 +0100)
committerGitHub <noreply@github.com>
Wed, 17 Dec 2025 10:44:55 +0000 (11:44 +0100)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
docs/en/mkdocs.yml
scripts/docs.py

index 60d2f977e5aa5a63e79790b370e6edd3e4657088..66094c81e4fdaec28acc9cc7995277381b8606c2 100644 (file)
@@ -317,24 +317,10 @@ extra:
     name: de - Deutsch
   - link: /es/
     name: es - español
-  - link: /fr/
-    name: fr - français
-  - link: /ja/
-    name: ja - 日本語
-  - link: /ko/
-    name: ko - 한국어
   - link: /pt/
     name: pt - português
   - link: /ru/
     name: ru - русский язык
-  - link: /tr/
-    name: tr - Türkçe
-  - link: /uk/
-    name: uk - українська мова
-  - link: /zh/
-    name: zh - 简体中文
-  - link: /zh-hant/
-    name: zh-hant - 繁體中文
 extra_css:
 - css/termynal.css
 - css/custom.css
index 75583a1cb2e2e57ecd1ed277ca3fbdbb03104236..b35bb3627f556a5ad30943929c2155cc396650e3 100644 (file)
@@ -19,6 +19,9 @@ from slugify import slugify as py_slugify
 
 logging.basicConfig(level=logging.INFO)
 
+SUPPORTED_LANGS = {"en", "de", "es", "pt", "ru"}
+
+
 app = typer.Typer()
 
 mkdocs_name = "mkdocs.yml"
@@ -260,7 +263,11 @@ def build_all() -> None:
     """
     update_languages()
     shutil.rmtree(site_path, ignore_errors=True)
-    langs = [lang.name for lang in get_lang_paths() if lang.is_dir()]
+    langs = [
+        lang.name
+        for lang in get_lang_paths()
+        if (lang.is_dir() and lang.name in SUPPORTED_LANGS)
+    ]
     cpu_count = os.cpu_count() or 1
     process_pool_size = cpu_count * 4
     typer.echo(f"Using process pool size: {process_pool_size}")
@@ -340,6 +347,9 @@ def get_updated_config_content() -> Dict[str, Any]:
     for lang_path in get_lang_paths():
         if lang_path.name in {"en", "em"} or not lang_path.is_dir():
             continue
+        if lang_path.name not in SUPPORTED_LANGS:
+            # Skip languages that are not yet ready
+            continue
         code = lang_path.name
         languages.append({code: f"/{code}/"})
     for lang_dict in languages:
@@ -418,7 +428,7 @@ def verify_docs():
 def langs_json():
     langs = []
     for lang_path in get_lang_paths():
-        if lang_path.is_dir():
+        if lang_path.is_dir() and lang_path.name in SUPPORTED_LANGS:
             langs.append(lang_path.name)
     print(json.dumps(langs))