mirror of
https://github.com/odoo/documentation.git
synced 2025-12-14 08:29:13 +07:00
[FIX] conf: don't use None in language switcher
In a lang is not present in languages_names, the menu was displaying None Part-of: odoo/documentation#8150
This commit is contained in:
2
conf.py
2
conf.py
@@ -442,7 +442,7 @@ def _generate_alternate_urls(app, pagename, templatename, context, doctree):
|
||||
"""
|
||||
_current_lang = app.config.language or 'en'
|
||||
# Replace the context value by its upper-cased value ("FR" instead of "fr")
|
||||
context['language'] = languages_names.get(_current_lang)
|
||||
context['language'] = languages_names.get(_current_lang, _current_lang.upper())
|
||||
context['language_code'] = _current_lang
|
||||
|
||||
# If the list of languages is not set, assume that the project has no alternate language
|
||||
|
||||
Reference in New Issue
Block a user