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

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

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.

… 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>
@susnux
Copy link
Contributor Author

susnux commented Aug 23, 2024

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@susnux susnux requested review from szaimen and removed request for skjnldsv August 25, 2024 21:42
Copy link
Collaborator

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@blizzz blizzz mentioned this pull request Aug 29, 2024
24 tasks
susnux added a commit that referenced this pull request Aug 29, 2024
[stable29] fix: Use the user configured UI language for PDFjs instead of browser language #1026
@AndyScherzinger AndyScherzinger merged commit 4cccde1 into stable30 Aug 29, 2024
38 of 39 checks passed
@AndyScherzinger AndyScherzinger deleted the fix/stable30-user-lang branch August 29, 2024 13:50
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.

4 participants