mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Do not add a language fallback by the stripping country code (#9635)
This commit is contained in:
parent
a6c2bdd371
commit
41ee3be2cc
@ -119,6 +119,8 @@ Bugs fixed
|
|||||||
titles tend to rank higher than subsection titles. In addition, boost matches
|
titles tend to rank higher than subsection titles. In addition, boost matches
|
||||||
on the name of programming domain objects relative to title/subtitle matches.
|
on the name of programming domain objects relative to title/subtitle matches.
|
||||||
Patch by James Addison and Will Lachance.
|
Patch by James Addison and Will Lachance.
|
||||||
|
* #9634: Do not add a fallback language by stripping the country code.
|
||||||
|
Patch by Alvin Wong.
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
-------
|
-------
|
||||||
|
@ -114,11 +114,7 @@ def init(
|
|||||||
translator = None
|
translator = None
|
||||||
|
|
||||||
if language:
|
if language:
|
||||||
if '_' in language:
|
languages: list[str] | None = [language]
|
||||||
# for language having country code (like "de_AT")
|
|
||||||
languages: list[str] | None = [language, language.split('_')[0]]
|
|
||||||
else:
|
|
||||||
languages = [language]
|
|
||||||
else:
|
else:
|
||||||
languages = None
|
languages = None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user