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.
User might only have "only if creator" permission so checking on doctype
will incorrectly flag it.
Not sure if there's any better/simpler way to handle this. This is weird
edge case on how files operate.
* refactor: show login with frappe cloud button in login page
instead of throwing the user to site-login page, show them all the options
* fix: use is_frappecloud method to check if site is on fc
since `is_fc_site` checks if the user is a system manager and a guest user is not one
* refactor: use a better fc logo
also show login with fc button only for users coming from new signup flow (for now)
* fix: logo alignment with text