Merge pull request #18486 from Snuffleupagus/AppOptions-replace-locale

Replace the GENERIC-only "locale" with "localeProperties" in AppOptions
This commit is contained in:
Tim van der Meij 2024-07-23 15:50:29 +02:00 committed by GitHub
commit cb737512de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View file

@ -90,7 +90,10 @@ const defaultOptions = {
},
localeProperties: {
/** @type {Object} */
value: null,
value:
typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")
? { lang: navigator.language || "en-US" }
: null,
kind: OptionKind.BROWSER,
},
nimbusDataStr: {
@ -473,11 +476,6 @@ if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
value: typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING"),
kind: OptionKind.VIEWER,
};
defaultOptions.locale = {
/** @type {string} */
value: navigator.language || "en-US",
kind: OptionKind.VIEWER,
};
} else if (PDFJSDev.test("CHROME")) {
defaultOptions.disableTelemetry = {
/** @type {boolean} */