mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4945 from zhsj/fix-search-lang
fix lang_COUNTRY not fallback correctly for IndexBuilder
This commit is contained in:
commit
a9e66bc447
1
CHANGES
1
CHANGES
@ -105,6 +105,7 @@ Bugs fixed
|
||||
|
||||
* i18n: message catalogs were reset on each initialization
|
||||
* #4850: latex: footnote inside footnote was not rendered
|
||||
* i18n: fix lang_COUNTRY not fallback correctly for IndexBuilder
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -444,9 +444,9 @@ class StandaloneHTMLBuilder(Builder):
|
||||
# create the search indexer
|
||||
self.indexer = None
|
||||
if self.search:
|
||||
from sphinx.search import IndexBuilder, languages
|
||||
from sphinx.search import IndexBuilder
|
||||
lang = self.config.html_search_language or self.config.language
|
||||
if not lang or lang not in languages:
|
||||
if not lang:
|
||||
lang = 'en'
|
||||
self.indexer = IndexBuilder(self.env, lang,
|
||||
self.config.html_search_options,
|
||||
|
Loading…
Reference in New Issue
Block a user