Exceptions from CSharpRepl are translated, and they shouldn't be.
This happens when you try running code, which wouldn't be compiled, for example missing semicolon, no such variable.
Exceptions from the code itself aren't translated, which is expected.
Example:
> System.Threading.Thread.CurrentThread.CurrentCulture
pl-PL
> System.Threading.Thread.CurrentThread.CurrentUICulture
en-US
> throw new Exception();
┌────────────────────Exception─────────────────────┐
│ Exception of type 'System.Exception' was thrown. │
└──────────────────────────────────────────────────┘
> AppDomain.CurrentDomain.SetupInformation.TargetFrameworkName
".NETCoreApp,Version=v7.0"
> show translation issue
┌───────────────────Exception───────────────────┐
│ (1,18): error CS1002: Oczekiwano średnika (;) │
└───────────────────────────────────────────────┘
When I have the same code in a .cs file, and try compiling it either with Visual Studio 2022, or via dotnet build / dotnet run, I'm getting this message in English:
The proper native .cs code, when run, shows the same culture values - pl-PL / en-US.
Running Windows 11, English United States with Polish language pack added.
Windows Display Language is set to English.
Preferred languages are English (United States), Polish.
Country or region: United States
Regional format: Polish (Poland)
Even the keyboard language was set to English (United States), with Polish Programmer's layout
.cs files tested with both .NET 7.0.12 / 7.0.402 and 8.0.0-rc.1.23419.4 / 8.0.100-rc.1.23455.8
Version
0.6.5
What happened?
Exceptions from CSharpRepl are translated, and they shouldn't be. This happens when you try running code, which wouldn't be compiled, for example missing semicolon, no such variable.
Exceptions from the code itself aren't translated, which is expected.
Example:
When I have the same code in a .cs file, and try compiling it either with Visual Studio 2022, or via
dotnet build
/dotnet run
, I'm getting this message in English:The proper native .cs code, when run, shows the same culture values - pl-PL / en-US.
Running Windows 11, English United States with Polish language pack added. Windows Display Language is set to English. Preferred languages are English (United States), Polish. Country or region: United States Regional format: Polish (Poland) Even the keyboard language was set to English (United States), with Polish Programmer's layout
.cs files tested with both .NET 7.0.12 / 7.0.402 and 8.0.0-rc.1.23419.4 / 8.0.100-rc.1.23455.8
I haven't tested CSharpRepl with #241 / #296 fix.