Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper browser language handling in captive-portal #8540

Open
KozlikCZ opened this issue Feb 7, 2025 · 0 comments
Open

Improper browser language handling in captive-portal #8540

KozlikCZ opened this issue Feb 7, 2025 · 0 comments

Comments

@KozlikCZ
Copy link

KozlikCZ commented Feb 7, 2025

Describe the bug
I installed Czech language in PF and set Czech language (cs) in Firefox browser but only en_US lang works.

To Reproduce

  1. Install cz language PO file from Transifex as described in the PF development guide.
  2. Add the lang cs_CZ in files /usr/local/pf/Makefile, /usr/local/pf/html/pfappserver/root/src/globals/pfLocales.js, /usr/local/pf/lib/pf/web/constants.pm, /usr/local/pf/conf/documentation.conf.
  3. Rebuid containers pfperl-api, httpd.admin_dispatcher, httpd.portal
  4. Restart services pfperl-api, httpd.admin_dispatcher, httpd.portal
  5. Set Czech language in Firefox browser - only 'cs'
  6. Remove all language settings in PF GUI -> Connection Profile -> Captive Portal -> Languages
  7. Refresh captive-portal pages in PF GUI -> Connection Profile -> Preview

Expected behavior
My browser language set: 1. cs, 2. en_US, PF language result set 1. en_US, 2. cs_CZ. PF evaluated general browser lang cs as closest lang cs_CZ with lower priority than exact lang en_US. This result set is better: 1. cs_CZ, 2. en_US with preserved priority. Czech language hasn't any variant and there is only cs language in Firefox. I made a patch - in attachment.

lang.patch.txt

PF:

  • OS Linux, Debian 11.11
  • PF 13.2 with all updates

Desktop (please complete the following information):

  • OS Linux, Debian 12.9
  • Browser Firefox 128.7.0esr (64 bits)

Thanks

Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant