-
Notifications
You must be signed in to change notification settings - Fork 62
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
launcher: set preferred language list from system locale #732
base: master
Are you sure you want to change the base?
Conversation
9eddac8
to
d281298
Compare
d281298
to
125f665
Compare
Thanks for the review, I've fixed the issues you raised and factored the code in a separate function for clarity. |
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. |
|
||
/* build Accept-Language from locale, filtering out encodings */ | ||
locales = g_get_language_names(); | ||
length = g_strv_length((gchar **) g_get_language_names()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 changes the Accept-Language header to match the system locale by default.