-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Build host should localize message output #74902
Comments
I would not expect us to directly listen to the environment variable. If we were going to support localization, I'd expect us to look at CurrentCulture or similar in that launch point and then pass that along as a switch to get it to be passed to the other process. The reason for distinction would be there's no requirement that MSBuildWorkspace be used in a process where DOTNET_CLI_UI_LANGUAGE is valid in the first place, and if we're running a .NET Framework host, we can't set the environment variable there. |
I agree. Many users expect their VS Code Locale to take precedence. |
@JoeRobich I think we already pass the locale over to Current[UI]Culture as a part of LSP command dispatching, right? So as long as MSBuildWorkspace does the right thing, this should hopefully work? |
@jasonmalinowski Yes. I think we should pass the CurrentCulture as you suggest. Do not want to break the chain of VS Code locale -> Roslyn LSP -> BuildHost by looking at an environment variable. |
See #74896
See https://github.com/dotnet/roslyn/blob/main/src/Workspaces/Core/MSBuild/MSBuild/BuildHostProcessManager.cs#L158
When starting the build host we do not pass the user value for
DOTNET_CLI_UI_LANGUAGE
to the build host, so the output is not localized. Likely we should just be passing this over to the build host.There is an open question of what should happen if VSCode configures one language, and
DOTNET_CLI_UI_LANGUAGE
specifies a different one.The text was updated successfully, but these errors were encountered: