3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #139701 from wamserma/firefox-bin-locales

firefox-bin: fix locale selection
This commit is contained in:
Bernardo Meurer 2021-10-27 08:04:57 -07:00 committed by GitHub
commit 5659072a1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@
, ffmpeg
, runtimeShell
, mesa # firefox wants gbm for drm+dmabuf
, systemLocale ? config.i18n.defaultLocale or "en-US"
, systemLocale ? config.i18n.defaultLocale or "en_US"
}:
let
@ -78,7 +78,12 @@ let
defaultSource = lib.findFirst (sourceMatches "en-US") {} sources;
source = lib.findFirst (sourceMatches systemLocale) defaultSource sources;
mozLocale =
if systemLocale == "ca_ES@valencia"
then "ca-valencia"
else lib.replaceStrings ["_"] ["-"] systemLocale;
source = lib.findFirst (sourceMatches mozLocale) defaultSource sources;
pname = "firefox-${channel}-bin-unwrapped";