diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-11-21 14:46:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-21 14:46:57 -0800 |
commit | c487cf9261c61f0db4e5d1df3c83a60384b330db (patch) | |
tree | 60a62c01891e300a0a6d90b63061d3d0256eff19 /Doc/tools/static | |
parent | 27c16e33b1acac55641a27faa5a11508ee605adc (diff) | |
download | cpython-git-c487cf9261c61f0db4e5d1df3c83a60384b330db.tar.gz |
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 <julien@palard.fr>
Diffstat (limited to 'Doc/tools/static')
-rw-r--r-- | Doc/tools/static/switchers.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/tools/static/switchers.js b/Doc/tools/static/switchers.js index d885ff2bbf..20dad93d6a 100644 --- a/Doc/tools/static/switchers.js +++ b/Doc/tools/static/switchers.js @@ -49,6 +49,12 @@ else buf.push('<option value="' + language + '">' + title + '</option>'); }); + if (!(current_language in all_languages)) { + // In case we're browsing a language that is not yet in all_languages. + buf.push('<option value="' + current_language + '" selected="selected">' + + current_language + '</option>'); + all_languages[current_language] = current_language; + } buf.push('</select>'); return buf.join(''); } |