summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-21 14:47:10 -0800
committerGitHub <noreply@github.com>2018-11-21 14:47:10 -0800
commitfcbcebadff46f907b38fcf2d79adb3209c5a205d (patch)
treea369a2bca8cb5d85bf1d9fd2554eba3068d25bd2 /Doc
parent40fdf471931f029ea07e6190f0fe116e0735661b (diff)
downloadcpython-git-fcbcebadff46f907b38fcf2d79adb3209c5a205d.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')
-rw-r--r--Doc/tools/static/switchers.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/tools/static/switchers.js b/Doc/tools/static/switchers.js
index 2c051eb077..dbf907e09d 100644
--- a/Doc/tools/static/switchers.js
+++ b/Doc/tools/static/switchers.js
@@ -48,6 +48,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('');
}