mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-24 11:50:14 +10:00
fix(insider): test before using getPreferredSystemLanguages
closes #1335
This commit is contained in:
18
patches/insider/system-languages.patch
Normal file
18
patches/insider/system-languages.patch
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
diff --git a/src/main.js b/src/main.js
|
||||||
|
index 63f8c56..a6b7d44 100644
|
||||||
|
--- a/src/main.js
|
||||||
|
+++ b/src/main.js
|
||||||
|
@@ -575,6 +575,10 @@ async function resolveNlsConfiguration() {
|
||||||
|
*/
|
||||||
|
- // @ts-ignore API not yet available in the official Electron
|
||||||
|
- let appLocale = ((product.quality === 'insider' || product.quality === 'exploration') && app?.getPreferredSystemLanguages()?.length) ?
|
||||||
|
+ let appLocale = app.getLocale();
|
||||||
|
+ if (product.quality === 'insider' || product.quality === 'exploration') {
|
||||||
|
// @ts-ignore API not yet available in the official Electron
|
||||||
|
- app.getPreferredSystemLanguages()[0] : app.getLocale();
|
||||||
|
+ if (app.getPreferredSystemLanguages && app?.getPreferredSystemLanguages()?.length) {
|
||||||
|
+ // @ts-ignore API not yet available in the official Electron
|
||||||
|
+ appLocale = app.getPreferredSystemLanguages()[0];
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
if (!appLocale) {
|
||||||
@@ -157,11 +157,13 @@
|
|||||||
"documentFiltersExclusive"
|
"documentFiltersExclusive"
|
||||||
],
|
],
|
||||||
"GitHub.vscode-pull-request-github": [
|
"GitHub.vscode-pull-request-github": [
|
||||||
|
"contribCommentThreadAdditionalMenu",
|
||||||
"tokenInformation",
|
"tokenInformation",
|
||||||
"commentsResolvedState",
|
"commentsResolvedState",
|
||||||
"contribShareMenu",
|
"contribShareMenu",
|
||||||
"contribCommentPeekContext",
|
"contribCommentPeekContext",
|
||||||
"treeItemCheckbox"
|
"treeItemCheckbox",
|
||||||
|
"codiconDecoration"
|
||||||
],
|
],
|
||||||
"GitHub.copilot": [
|
"GitHub.copilot": [
|
||||||
"inlineCompletionsAdditions"
|
"inlineCompletionsAdditions"
|
||||||
|
|||||||
Reference in New Issue
Block a user