8
8
using T3 . Editor . Gui . Styling ;
9
9
using T3 . Editor . Gui . UiHelpers ;
10
10
using T3 . Editor . App ;
11
+ using System . Windows . Forms ;
11
12
12
13
13
14
namespace T3 . Editor . Gui . Dialog ;
@@ -106,8 +107,8 @@ private void UpdateSystemInfo()
106
107
#endif
107
108
systemInfo . AppendLine ( $ "App language: { GetAppLanguage ( ) } ") ;
108
109
systemInfo . AppendLine ( $ "OS: { GetOperatingSystemInfo ( ) } ") ;
109
- systemInfo . AppendLine ( $ "System language: { GetSystemLanguage ( englishName : true ) } ") ;
110
- systemInfo . AppendLine ( $ "Keyboard Layout: { GetSystemLanguage ( englishName : false ) } ") ;
110
+ systemInfo . AppendLine ( $ "System language: { GetSystemLanguage ( ) } ") ;
111
+ systemInfo . AppendLine ( $ "Keyboard Layout: { GetKeyboardLayout ( ) } ") ;
111
112
systemInfo . AppendLine ( $ ".NET runtime: { GetDotNetRuntimeVersion ( ) } ") ;
112
113
systemInfo . AppendLine ( $ ".NET SDK: { GetDotNetSdkVersion ( ) } ") ;
113
114
systemInfo . AppendLine ( $ "GPU: { GetGpuInformation ( ) } ") ;
@@ -128,14 +129,25 @@ private static string GetOperatingSystemInfo()
128
129
return $ "{ osDescription } ({ osArchitecture } )";
129
130
}
130
131
131
- private static string GetSystemLanguage ( bool englishName = true )
132
+ private static string GetSystemLanguage ( )
132
133
{
133
134
try
134
135
{
135
136
var currentCulture = CultureInfo . CurrentUICulture ;
136
- return englishName
137
- ? currentCulture . EnglishName
138
- : $ "{ currentCulture . KeyboardLayoutId } ({ currentCulture . Parent } )";
137
+ return currentCulture . EnglishName ;
138
+ }
139
+ catch ( Exception )
140
+ {
141
+ return "Unknown" ;
142
+ }
143
+ }
144
+
145
+ private static string GetKeyboardLayout ( )
146
+ {
147
+ try
148
+ {
149
+ var currentInputLanguage = InputLanguage . CurrentInputLanguage ;
150
+ return $ "{ currentInputLanguage . Culture . Name } ";
139
151
}
140
152
catch ( Exception )
141
153
{
@@ -270,8 +282,8 @@ private static string GetIdeName()
270
282
private static readonly string dateTime = DateTime . Now . ToString ( "yyyy-MM-dd HH:mm:ss" ) ;
271
283
272
284
private static readonly string operatingSystemInfo = GetOperatingSystemInfo ( ) ;
273
- private static readonly string systemLanguage = GetSystemLanguage ( englishName : true ) ;
274
- private static readonly string keyboardLayout = GetSystemLanguage ( englishName : false ) ;
285
+ private static readonly string systemLanguage = GetSystemLanguage ( ) ;
286
+ private static readonly string keyboardLayout = GetKeyboardLayout ( ) ;
275
287
private static readonly string dotNetRuntime = GetDotNetRuntimeVersion ( ) ;
276
288
private static readonly string dotNetSdk = GetDotNetSdkVersion ( ) ;
277
289
private static readonly string gpuInformation = GetGpuInformation ( ) ;
0 commit comments