-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treat any en-*
dialect as default
#159664
Comments
We use to have an en-GB language pack. I took it down because the localization team didn't want to maintain it. However there are folks that still want it (@Tyriar being one): I've thought about offering tooling for folks to make languages packs... en-GB would be a perfect candidate for this. So at first glance, I don't like this idea. |
What's the performance impact of this? Is it just a single request one time for en-* language packs that gets cached after that? |
@TylerLeonhardt is there a way this could be cached so it's only done on a cold start or when some change is detected? I'd say let's handle en specially like @bpasero is suggesting if not, we can always change it if there are ever other language packs. |
The require call you are seeing is here: Line 563 in 70c7237
languagePacks.js file which isn't huge. So I guess the time we are seeing is actually spent in getNLSConfiguration() which tries to find a language pack on disk in case the locale is not en or en-US which we can extend to en-* . So we can't avoid that code for locales !== 'en'.
If we write the locale into |
We track it in Kusto and I think its typically in the |
OK. Good to know. |
I'm fine with treating all |
Yeah that was my suggestion. Nevertheless, if we can revisit how NLS is blocking startup in a waterfall or not, I am also happy. |
Is there any reason |
The code is executed in the main thread and not the renderer. That is why it is not bundled into the renderer. To my 'old' knowledge we don't have a main bundle (@bpasero is this still correct). If we do we should definitely bundle it there. |
Yeah, at that point its just commonJS, not AMD. |
Could we use esbuild to bundle main.js? Then we don't need to use AMD. |
We can for the vscode/src/vs/base/node/languagePacks.js Lines 73 to 82 in a5c0f6c
|
Agree, but we could easily replace this with a async read since the call to |
That would be very cool! To prevent sync fs reads. |
Opened #159894 for that with a PR. |
Today we seem to look for a language pack when e.g.
en-GB
is declared. But the fast path is to let it through as our default locale since we have no language pack for it as far we are concerned.vscode/src/vs/base/node/languagePacks.js
Lines 126 to 130 in 963bd98
The text was updated successfully, but these errors were encountered: