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

[stable29] fix: Use the user configured UI language for PDFjs instead of browser language #1026 #1027

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 23, 2024

PDFjs uses the browser language by default, but users should have consistently the Nextcloud defined language. So now we set the PDFjs language to:

  1. The Nextcloud configured language if supported
  2. The unflavored version if supported (e.g. de instead of de-DE)
  3. Fall back to browser UI language

We need 3 because if we set an unsupported lanuage PDFjs will default to English, which is worse than the browser UI language.

@susnux
Copy link
Contributor Author

susnux commented Aug 23, 2024

/compile

@susnux susnux added this to the Nextcloud 29.0.6 milestone Aug 24, 2024
@susnux susnux requested review from szaimen and removed request for skjnldsv August 25, 2024 21:42
@blizzz blizzz mentioned this pull request Aug 29, 2024
6 tasks
susnux added 2 commits August 29, 2024 14:54
… language

PDFjs uses the browser language by default, but users should have consistently the Nextcloud defined language.
So now we set the PDFjs language to:
1. The Nextcloud configured language if supported
2. The unflavored version if supported (e.g. `de` instead of `de-DE`)
3. Fall back to browser UI language

We need 3 because if we set an unsupported lanuage PDFjs will default to English,
which is worse than the browser UI language.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/stable29-user-lang branch from a405ea7 to 5878856 Compare August 29, 2024 12:55
@susnux susnux enabled auto-merge August 29, 2024 12:56
@susnux susnux merged commit b40fc10 into stable29 Aug 29, 2024
39 of 40 checks passed
@susnux susnux deleted the fix/stable29-user-lang branch August 31, 2024 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants