launcher: set preferred language list from system locale#732
Open
rawoul wants to merge 1 commit intoIgalia:masterfrom
Open
launcher: set preferred language list from system locale#732rawoul wants to merge 1 commit intoIgalia:masterfrom
rawoul wants to merge 1 commit intoIgalia:masterfrom
Conversation
9eddac8 to
d281298
Compare
TingPing
reviewed
Aug 28, 2024
TingPing
reviewed
Aug 28, 2024
TingPing
reviewed
Aug 28, 2024
d281298 to
125f665
Compare
Contributor
Author
|
Thanks for the review, I've fixed the issues you raised and factored the code in a separate function for clarity. |
Member
|
I have one concern, this exposes system information directly to the web which adds information for fingerprinting. Browsers like Safari specifically filter and reduce this list to make it less unique. If this does or doesn't matter to Cog is probably for another dev to decide. |
TingPing
reviewed
Aug 29, 2024
|
|
||
| /* build Accept-Language from locale, filtering out encodings */ | ||
| locales = g_get_language_names(); | ||
| length = g_strv_length((gchar **) g_get_language_names()); |
Member
There was a problem hiding this comment.
I think we might have to reformat the languages.
MDN says the format is en-US yet this will return en_US.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes the Accept-Language header to match the system locale by default.