From: Sebastián Ramírez Date: Sat, 24 Oct 2020 11:32:59 +0000 (+0200) Subject: 🐛 Fix docs order generation for partial translations (#2238) X-Git-Tag: 0.61.2~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8650dee4bc6bbd868bfb09face4412aa7179f621;p=thirdparty%2Ffastapi%2Ffastapi.git 🐛 Fix docs order generation for partial translations (#2238) --- diff --git a/scripts/docs.py b/scripts/docs.py index aaf53bf649..25ca519001 100644 --- a/scripts/docs.py +++ b/scripts/docs.py @@ -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[()]