Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 85573db

Browse files
committed
Respond to PR feedback: use method names not comments
1 parent a1c423c commit 85573db

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/dotnet/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ private static void InitializeProcess()
199199
// see the .NET Core Notes in https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx
200200
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
201201

202-
// Honor UI language customization
203202
UILanguageOverride.Setup();
204203
}
205204

src/dotnet/UILanguageOverride.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@ internal static class UILanguageOverride
1515
public static void Setup()
1616
{
1717
CultureInfo language = GetOverriddenUILanguage();
18-
if (language == null)
18+
if (language != null)
1919
{
20-
return;
20+
ApplyOverrideToCurrentProcess(language);
21+
FlowOverrideToChildProcesses(language);
2122
}
23+
}
2224

23-
// Make the current process respect the override.
25+
private static void ApplyOverrideToCurrentProcess(CultureInfo language)
26+
{
2427
CultureInfo.DefaultThreadCurrentUICulture = language;
28+
}
2529

26-
// Pass down the override to other processes that we start via appropriate environment variables
30+
private static void FlowOverrideToChildProcesses(CultureInfo language)
31+
{
2732
// Do not override any environment variables that are already set as we do not want to clobber a more granular setting with our global setting.
2833
SetIfNotAlreadySet(DOTNET_CLI_UI_LANGUAGE, language.Name);
2934
SetIfNotAlreadySet(VSLANG, language.LCID); // for tools following VS guidelines to just work in CLI

0 commit comments

Comments
 (0)