]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🐛 Fix docs order generation for partial translations (#2238)
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 24 Oct 2020 11:32:59 +0000 (13:32 +0200)
committerGitHub <noreply@github.com>
Sat, 24 Oct 2020 11:32:59 +0000 (13:32 +0200)
scripts/docs.py

index aaf53bf64982e02d4f59f91002e35edb49c10b1c..25ca5190018abcf357fc7993b4dee6e47c46fdbe 100644 (file)
@@ -171,7 +171,11 @@ def build_lang(
                         new_key += (key_part,)
                 use_lang_file_to_nav[file] = new_key
     key_to_section = {(): []}
-    for file, file_key in use_lang_file_to_nav.items():
+    for file, orig_file_key in file_to_nav.items():
+        if file in use_lang_file_to_nav:
+            file_key = use_lang_file_to_nav[file]
+        else:
+            file_key = orig_file_key
         section = get_key_section(key_to_section=key_to_section, key=file_key)
         section.append(file)
     new_nav = key_to_section[()]