Install regional browser locale data - #357
Conversation
Sayan-
left a comment
There was a problem hiding this comment.
- p2 the
en-GB.pakcopies appear to have no observable effect. Against the pinned chrome-for-testing 152.0.7977.42: without them,LANGUAGE=en_CA/en_IE/en_SGalready openlocales/en-GB.pak; with them the opened filename changes but the file is md5-identical, andnavigator.languagereadsen-GBeither way, since it follows--accept-lang. - p2 the tzdata install is not browser-visible. With
TZ=America/New_Yorkand no tzdata present,Intl.DateTimeFormat().resolvedOptions().timeZonealready reportsAmerica/New_York, identical to the post-install result, because Chromium resolves TZ through bundled ICU. It does fix glibc-level time, which printsAmericaas the zone abbreviation today. - p2 no test or e2e assertion in this repo covers timezone or locale.
- p2 pre-existing and untouched here:
server/cmd/wrapper/chromium.go:17hardcodes--accept-lang=en-US,enon the default headless path, so local and e2e runs stay en-US regardless of the locales this adds.
|
addressed in 6486e5b. the
the pack filename preserves the application locale while reusing the identical en-GB UI strings, so i kept the aliases and documented why. also kept i didn't change the wrapper default: production supplies non-empty |
summary
tzdataandlocalesin headful and headless browser imageswhy
Browser VMs need timezone data for process-level
TZhandling and generated locales forLANG/LC_ALL. Chrome also needs a matching locale resource pack or it falls back to a packaged locale.tests
Asia/Singapore/en-SGand verified the JavaScript timezone, Intl locale, and navigator languageNote
Low Risk
Image-layer and test-only changes for locale/timezone fidelity; no runtime server logic or auth/data paths affected.
Overview
Headful and headless Chromium images now ship OS-level timezone data and several English POSIX locales, and Chrome gets locale resource packs for regions Chrome does not bundle separately.
Both Dockerfiles install
localesandtzdata, runlocale-genforen_US,en_GB,en_CA,en_IE, anden_SGUTF-8, and during Chrome-for-Testing install copyen-GB.paktoen-CA,en-IE, anden-SGso--langcan match containerLANG/TZwithout falling back to a default pack.A new e2e test (
TestRegionalBrowserLocation) starts each image with Singapore timezone anden-SGenv/flags, checks the container reports UTF-8 and+0800, and uses CDP to assertnavigator.language,Intllocale, and timezone in the browser.Reviewed by Cursor Bugbot for commit 6486e5b. Bugbot is set up for automated code reviews on this repo. Configure here.