diff options
author | Julien Palard <julien@palard.fr> | 2018-11-20 16:18:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 16:18:30 (GMT) |
commit | 6b73bb523a176123a819e4ebac3727d31d861515 (patch) | |
tree | dd1336e3b062cf9fe07959471b4aabd865a6d51e /Doc | |
parent | 02e6bf7f2025cddcbde6432f6b6396198ab313f4 (diff) | |
download | cpython-6b73bb523a176123a819e4ebac3727d31d861515.zip cpython-6b73bb523a176123a819e4ebac3727d31d861515.tar.gz cpython-6b73bb523a176123a819e4ebac3727d31d861515.tar.bz2 |
bpo-31146: Don't fallback switcher to english on not-yet pusblished languages. (GH-10558)
Diffstat (limited to 'Doc')
-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 d885ff2..20dad93 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(''); } |