-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix blank web page when locale is invalid by improving language fallb…
…ack logic (#599) ### Summary & Motivation Fix blank page being served where browser language settings like `en` or `en-UK` were uncritically used as the HTML Document language, even if translations weren't available for that exact locale. Now, the logic checks if a translation exists for the base language code (e.g., `en`), and if none is found, it falls back to `en-US`. This ensures that the document always has a valid locale that corresponds to available translations. ### Checklist - [x] I have added a Label to the pull-request - [x] I have added tests, and done manual regression tests - [x] I have updated the documentation, if necessary
- Loading branch information
Showing
2 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters