LibWebView: Add language settings to about:settings

This implements a setting to change the languages provided to websites
from `navigator.language(s)` and the `Accept-Language` header. Whereas
the existing Qt settings dialog allows users to type their language of
choice, this setting allows users to select from a predefined list of
languages. They may choose any number of languages and their preferred
order.

This patch only implements the persisted settings and their UI. It does
not integrate the choses languages into the WebContent process.
This commit is contained in:
Timothy Flynn 2025-04-03 13:42:39 -04:00 committed by Jelle Raaijmakers
commit f242920cc9
Notes: github-actions[bot] 2025-04-04 08:17:38 +00:00
8 changed files with 466 additions and 13 deletions

View file

@ -74,6 +74,11 @@ set(ABOUT_PAGES
)
list(TRANSFORM ABOUT_PAGES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/ladybird/about-pages/")
set(ABOUT_SETTINGS_RESOURCES
languages.js
)
list(TRANSFORM ABOUT_SETTINGS_RESOURCES PREPEND "${LADYBIRD_SOURCE_DIR}/Base/res/ladybird/about-pages/settings/")
set(WEB_TEMPLATES
directory.html
error.html
@ -170,6 +175,10 @@ function(copy_resources_to_build base_directory bundle_target)
DESTINATION ${base_directory} TARGET ${bundle_target}
)
copy_resource_set(ladybird/about-pages/settings RESOURCES ${ABOUT_SETTINGS_RESOURCES}
DESTINATION ${base_directory} TARGET ${bundle_target}
)
copy_resource_set(ladybird/templates RESOURCES ${WEB_TEMPLATES}
DESTINATION ${base_directory} TARGET ${bundle_target}
)