From fcbcebadff46f907b38fcf2d79adb3209c5a205d Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 21 Nov 2018 14:47:10 -0800 Subject: bpo-31146: Don't fallback switcher to english on not-yet pusblished languages. (GH-10558) (cherry picked from commit 6b73bb523a176123a819e4ebac3727d31d861515) Co-authored-by: Julien Palard --- Doc/tools/static/switchers.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/tools/static/switchers.js b/Doc/tools/static/switchers.js index 2c051eb..dbf907e 100644 --- a/Doc/tools/static/switchers.js +++ b/Doc/tools/static/switchers.js @@ -48,6 +48,12 @@ else buf.push(''); }); + if (!(current_language in all_languages)) { + // In case we're browsing a language that is not yet in all_languages. + buf.push(''); + all_languages[current_language] = current_language; + } buf.push(''); return buf.join(''); } -- cgit v0.12