mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 19:28:48 +00:00
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:
parent
26ec01068f
commit
f242920cc9
Notes:
github-actions[bot]
2025-04-04 08:17:38 +00:00
Author: https://github.com/trflynn89
Commit: f242920cc9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4215
Reviewed-by: https://github.com/gmta ✅
8 changed files with 466 additions and 13 deletions
|
@ -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}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue