fix: prioritize English language selection for Guest user despite additional browser language settings
Description:
- Resolved an issue where the system incorrectly activated a non-English language for Guest users, even when English was the primary language in the browser settings.
- The bug occurred when additional languages (e.g., Arabic) were configured in the browser and one of those languages was already enabled in Frappe.
- Ensured that English is prioritized as the default language for Guest users when it is present in the browser language list, regardless of other enabled languages.
- Added a fix to explicitly enable English language for Guest users to prevent unintended language switching.
Steps to Reproduce:
- Create a new clean site and add additional languages (e.g., Arabic) in the browser settings.
- Ensure the additional language (e.g., Arabic) is already enabled in the database, which is by default.
- Observe that the system switches to the non-English translation (e.g., Arabic) for Guest users, even if English is the primary language in the browser settings.
Root Cause Analysis:
- Initially suspected `translate.py` was involved in language resolution.
- Checked enabled languages at the console using:
`frappe.get_all("Language", filters={"enabled": 1}, pluck="name")`
Result: ['fr', 'fa', 'es', 'de', 'ar']
- Identified that English was not enabled in the system, despite being a default requirement.
- Traced the issue to `languages.csv`, where English was not included among the enabled languages.
Fix:
- Enabled English in `languages.csv` to ensure it is included among the supported languages.
- This ensures English is chosen when included in the browser settings, resolving the issue.
This commit is contained in:
parent
721af96f04
commit
a88f2a8fc5
1 changed files with 1 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ cs,Čeština,0
|
|||
da,Dansk,0
|
||||
de,Deutsch,1
|
||||
el,Ελληνικά,0
|
||||
en,English,0
|
||||
en,English,1
|
||||
en-GB,English (United Kingdom),0
|
||||
en-US,English (United States),0
|
||||
eo,In-Context Translation,0
|
||||
|
|
|
|||
|
Loading…
Add table
Reference in a new issue