Open TylerLeonhardt opened 1 year ago
The localize call:
The webworker one is weird... because there isn't a concept of env vars so
VSCODE_NLS_CONFIG
isn't a thing in the web like it is in node and is used to configure the REH AMD Loader:I'm not seeing us configure the AMD loader with the language which is why that one isn't working.
Originally posted by @TylerLeonhardt in #192787 (comment)
After getting the current language in html, pass it to worker when initializing it. Is it OK? AMDLoader in other places needs to pass other attributes such as supported languages, but here only the current language may be enough, because the page or application will be refreshed when switching languages.
That might do the trick... this is specifically talking about Core strings that exist in the webworker that need to be localized... in other words, not strings inside of an extension, for example.
The localize call: https://github.com/microsoft/vscode/blob/ba3978f8658ec5048d7d09c41016747ac997358b/src/vs/workbench/api/common/extHostLogService.ts#L21
The webworker one is weird... because there isn't a concept of env vars so
VSCODE_NLS_CONFIG
isn't a thing in the web like it is in node and is used to configure the REH AMD Loader: https://github.com/microsoft/vscode/blob/ba3978f8658ec5048d7d09c41016747ac997358b/src/vs/server/node/extensionHostConnection.ts#L46I'm not seeing us configure the AMD loader with the language which is why that one isn't working.
https://github.com/microsoft/vscode/blob/ba3978f8658ec5048d7d09c41016747ac997358b/src/vs/base/worker/workerMain.ts#L67
Originally posted by @TylerLeonhardt in https://github.com/microsoft/vscode/issues/192787#issuecomment-1714395217